Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index 1a3f33659854f404a6588caf0aed39ae58797812..4b3107fec70c7fb78a9b72bb440406b8590a4554 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.cc |
@@ -5708,8 +5708,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); |
__ CallApiFunctionAndReturn(api_function_address, |