| Index: runtime/vm/runtime_entry_x64.cc
|
| diff --git a/runtime/vm/runtime_entry_x64.cc b/runtime/vm/runtime_entry_x64.cc
|
| index a6ff6359720afc29de6328385d3c5950eeb2e76a..c3afdd8dbdd733ea3b6ff0660a2c1dce583a33b1 100644
|
| --- a/runtime/vm/runtime_entry_x64.cc
|
| +++ b/runtime/vm/runtime_entry_x64.cc
|
| @@ -15,6 +15,11 @@ namespace dart {
|
| #define __ assembler->
|
|
|
|
|
| +uword RuntimeEntry::GetEntryPoint() const {
|
| + return reinterpret_cast<uword>(function());
|
| +}
|
| +
|
| +
|
| // Generate code to call into the stub which will call the runtime
|
| // function. Input for the stub is as follows:
|
| // RSP : points to the arguments and return value array.
|
| @@ -23,15 +28,13 @@ namespace dart {
|
| void RuntimeEntry::Call(Assembler* assembler, intptr_t argument_count) const {
|
| if (is_leaf()) {
|
| ASSERT(argument_count == this->argument_count());
|
| - ExternalLabel label(GetEntryPoint());
|
| COMPILE_ASSERT(CallingConventions::kVolatileCpuRegisters & (1 << RAX));
|
| - __ LoadExternalLabel(RAX, &label, kNotPatchable);
|
| + __ movq(RAX, Address(THR, Thread::OffsetFromThread(this)));
|
| __ CallCFunction(RAX);
|
| } else {
|
| // Argument count is not checked here, but in the runtime entry for a more
|
| // informative error message.
|
| - ExternalLabel label(GetEntryPoint());
|
| - __ LoadExternalLabel(RBX, &label, kNotPatchable);
|
| + __ movq(RBX, Address(THR, Thread::OffsetFromThread(this)));
|
| __ movq(R10, Immediate(argument_count));
|
| __ Call(*StubCode::CallToRuntime_entry());
|
| }
|
|
|