| Index: runtime/vm/intrinsifier_x64.cc
|
| diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
|
| index d1957cef22d4514fe9cd54acd864b4dda2b7eb29..baae3fcf7fe0fef118d1674d5a09a515d674863e 100644
|
| --- a/runtime/vm/intrinsifier_x64.cc
|
| +++ b/runtime/vm/intrinsifier_x64.cc
|
| @@ -57,10 +57,13 @@ bool Intrinsifier::ObjectArray_Allocate(Assembler* assembler) {
|
| Isolate* isolate = Isolate::Current();
|
| Heap* heap = isolate->heap();
|
|
|
| - // RDI: allocation size.
|
| __ movq(RAX, Immediate(heap->TopAddress()));
|
| __ movq(RAX, Address(RAX, 0));
|
| - __ leaq(RCX, Address(RAX, RDI, TIMES_1, 0));
|
| +
|
| + // RDI: allocation size.
|
| + __ movq(RCX, RAX);
|
| + __ addq(RCX, RDI);
|
| + __ j(CARRY, &fall_through);
|
|
|
| // Check if the allocation fits into the remaining space.
|
| // RAX: potential new object start.
|
|
|