| Index: src/arm64/macro-assembler-arm64.cc
|
| diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc
|
| index 0253e7cdccb326656ab20c1aa27875d45f8c7f47..26f946793797ab0e0b38f688bdf506a70f8106ba 100644
|
| --- a/src/arm64/macro-assembler-arm64.cc
|
| +++ b/src/arm64/macro-assembler-arm64.cc
|
| @@ -1754,12 +1754,9 @@ static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
|
|
|
|
|
| void MacroAssembler::CallApiFunctionAndReturn(
|
| - Register function_address,
|
| - ExternalReference thunk_ref,
|
| - int stack_space,
|
| - int spill_offset,
|
| - MemOperand return_value_operand,
|
| - MemOperand* context_restore_operand) {
|
| + Register function_address, ExternalReference thunk_ref, int stack_space,
|
| + MemOperand* stack_space_operand, int spill_offset,
|
| + MemOperand return_value_operand, MemOperand* context_restore_operand) {
|
| ASM_LOCATION("CallApiFunctionAndReturn");
|
| ExternalReference next_address =
|
| ExternalReference::handle_scope_next_address(isolate());
|
| @@ -1871,8 +1868,16 @@ void MacroAssembler::CallApiFunctionAndReturn(
|
| Ldr(cp, *context_restore_operand);
|
| }
|
|
|
| + if (stack_space_operand != NULL) {
|
| + Ldr(w2, *stack_space_operand);
|
| + }
|
| +
|
| LeaveExitFrame(false, x1, !restore_context);
|
| - Drop(stack_space);
|
| + if (stack_space_operand != NULL) {
|
| + Drop(x2, 1);
|
| + } else {
|
| + Drop(stack_space);
|
| + }
|
| Ret();
|
|
|
| Bind(&promote_scheduled_exception);
|
|
|