| Index: vm/stub_code_x64_test.cc
|
| ===================================================================
|
| --- vm/stub_code_x64_test.cc (revision 8859)
|
| +++ vm/stub_code_x64_test.cc (working copy)
|
| @@ -19,7 +19,7 @@
|
| namespace dart {
|
|
|
| DECLARE_RUNTIME_ENTRY(TestSmiSub);
|
| -DECLARE_LEAF_RUNTIME_ENTRY(TestLeafSmiAdd);
|
| +DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
|
|
|
|
|
| static Function* CreateFunction(const char* name) {
|
| @@ -76,23 +76,17 @@
|
| static void GenerateCallToCallLeafRuntimeStub(Assembler* assembler,
|
| int value1,
|
| int value2) {
|
| - const int argc = 2;
|
| const Smi& smi1 = Smi::ZoneHandle(Smi::New(value1));
|
| const Smi& smi2 = Smi::ZoneHandle(Smi::New(value2));
|
| - const Object& result = Object::ZoneHandle();
|
| - const Context& context = Context::ZoneHandle(Context::New(0));
|
| - ASSERT(context.isolate() == Isolate::Current());
|
| __ enter(Immediate(0));
|
| - __ LoadObject(CTX, context);
|
| - __ PushObject(result); // Push Null object for return value.
|
| - __ PushObject(smi1); // Push argument 1 smi1.
|
| - __ PushObject(smi2); // Push argument 2 smi2.
|
| - ASSERT(kTestLeafSmiAddRuntimeEntry.argument_count() == argc);
|
| + __ ReserveAlignedFrameSpace(2 * kWordSize);
|
| + __ LoadObject(RAX, smi1);
|
| + __ movq(Address(RSP, 0), EAX); // Push argument 1 smi1.
|
| + __ LoadObject(RAX, smi2);
|
| + __ movq(Address(RSP, kWordSize), EAX); // Push argument 2 smi2.
|
| __ CallRuntime(kTestLeafSmiAddRuntimeEntry); // Call SmiAdd runtime func.
|
| - __ AddImmediate(RSP, Immediate(argc * kWordSize));
|
| - __ popq(RAX); // Pop return value from return slot.
|
| __ leave();
|
| - __ ret();
|
| + __ ret(); // Return value is in RAX.
|
| }
|
|
|
|
|
|
|