| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index 1fa2c8dc225cd4077cfa1511122c3709b3457576..94b3f403067a9e4cf3861e48c2a94586b5145f08 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -671,7 +671,7 @@ void MacroAssembler::PrepareCallApiFunction(int arg_stack_space) {
|
|
|
|
|
| void MacroAssembler::CallApiFunctionAndReturn(
|
| - Address function_address,
|
| + Register function_address,
|
| Address thunk_address,
|
| Register thunk_last_arg,
|
| int stack_space,
|
| @@ -697,6 +697,7 @@ void MacroAssembler::CallApiFunctionAndReturn(
|
| ExternalReference scheduled_exception_address =
|
| ExternalReference::scheduled_exception_address(isolate());
|
|
|
| + ASSERT(rdx.is(function_address));
|
| // Allocate HandleScope in callee-save registers.
|
| Register prev_next_address_reg = r14;
|
| Register prev_limit_reg = rbx;
|
| @@ -726,14 +727,13 @@ void MacroAssembler::CallApiFunctionAndReturn(
|
| j(zero, &profiler_disabled);
|
|
|
| // Third parameter is the address of the actual getter function.
|
| - Move(thunk_last_arg, function_address, RelocInfo::EXTERNAL_REFERENCE);
|
| + Move(thunk_last_arg, function_address);
|
| Move(rax, thunk_address, RelocInfo::EXTERNAL_REFERENCE);
|
| jmp(&end_profiler_check);
|
|
|
| bind(&profiler_disabled);
|
| // Call the api function!
|
| - Move(rax, reinterpret_cast<Address>(function_address),
|
| - RelocInfo::EXTERNAL_REFERENCE);
|
| + Move(rax, function_address);
|
|
|
| bind(&end_profiler_check);
|
|
|
|
|