Index: src/a64/code-stubs-a64.cc |
diff --git a/src/a64/code-stubs-a64.cc b/src/a64/code-stubs-a64.cc |
index 40aa0b617a4b5a625150126c4fe2cbae8a47bf68..50b8bb2852e042b74ff1efbebfe95736de92a0a5 100644 |
--- a/src/a64/code-stubs-a64.cc |
+++ b/src/a64/code-stubs-a64.cc |
@@ -5655,8 +5655,12 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) { |
MemOperand context_restore_operand( |
fp, (2 + FCA::kContextSaveIndex) * kPointerSize); |
// Stores return the first js argument |
- int return_value_offset = |
- 2 + (is_store ? FCA::kArgsLength : FCA::kReturnValueOffset); |
+ int return_value_offset = 0; |
+ if (is_store) { |
+ return_value_offset = 2 + FCA::kArgsLength; |
+ } else { |
+ return_value_offset = 2 + FCA::kReturnValueOffset; |
+ } |
MemOperand return_value_operand(fp, return_value_offset * kPointerSize); |
const int spill_offset = 1 + kApiStackSpace; |