Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: runtime/vm/assembler_macros_x64.cc

Issue 8984003: Port code generator to x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/integers.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_macros_x64.cc
===================================================================
--- runtime/vm/assembler_macros_x64.cc (revision 2556)
+++ runtime/vm/assembler_macros_x64.cc (working copy)
@@ -25,7 +25,7 @@
__ Untested("AssemblerMacros::TryAllocate");
Label ok;
__ LoadObject(instance_reg, cls);
- __ cmpl(instance_reg, class_reg);
+ __ cmpq(instance_reg, class_reg);
__ j(EQUAL, &ok, Assembler::kNearJump);
__ Stop("AssemblerMacros::TryAllocate, wrong arguments");
__ Bind(&ok);
@@ -35,14 +35,17 @@
if (FLAG_inline_alloc) {
Heap* heap = Isolate::Current()->heap();
const intptr_t instance_size = cls.instance_size();
- __ movq(instance_reg, Address::Absolute(heap->TopAddress()));
+ __ movq(TMP, Immediate(heap->TopAddress()));
+ __ movq(instance_reg, Address(TMP, 0));
__ addq(instance_reg, Immediate(instance_size));
// instance_reg: potential next object start.
- __ cmpq(instance_reg, Address::Absolute(heap->EndAddress()));
+ __ movq(TMP, Immediate(heap->EndAddress()));
+ __ cmpq(instance_reg, Address(TMP, 0));
__ j(ABOVE_EQUAL, failure, Assembler::kNearJump);
// Successfully allocated the object, now update top to point to
// next object start and store the class in the class field of object.
- __ movq(Address::Absolute(heap->TopAddress()), instance_reg);
+ __ movq(TMP, Immediate(heap->TopAddress()));
+ __ movq(Address(TMP, 0), instance_reg);
ASSERT(instance_size >= kHeapObjectTag);
__ subq(instance_reg, Immediate(instance_size - kHeapObjectTag));
__ movq(FieldAddress(instance_reg, Instance::class_offset()), class_reg);
« no previous file with comments | « runtime/lib/integers.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698