Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index b086780ae36cd42488da953633efc232e18c29ba..6049c430c0b1cf941e71efca7f3b45d227edfbd7 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -705,6 +705,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ RecordWriteField(a1, JSGeneratorObject::kInputOffset, v0, a3, |
kRAHasNotBeenSaved, kDontSaveFPRegs); |
+ // Store resume mode into generator object. |
+ __ sd(a2, FieldMemOperand(a1, JSGeneratorObject::kResumeModeOffset)); |
+ |
// Load suspended function and context. |
__ ld(cp, FieldMemOperand(a1, JSGeneratorObject::kContextOffset)); |
__ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset)); |
@@ -779,16 +782,10 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ bind(&done_loop); |
} |
- // Push resume mode (consumed in continuation). |
- __ Push(a2); |
- |
// Reset operand stack so we don't leak. |
__ LoadRoot(a5, Heap::kEmptyFixedArrayRootIndex); |
__ sd(a5, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset)); |
- // Restore value. |
- __ ld(v0, FieldMemOperand(a1, JSGeneratorObject::kInputOffset)); |
- |
// Resume the generator function at the continuation. |
__ ld(a3, FieldMemOperand(a4, JSFunction::kSharedFunctionInfoOffset)); |
__ ld(a3, FieldMemOperand(a3, SharedFunctionInfo::kCodeOffset)); |
@@ -798,6 +795,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ Daddu(a3, a3, Operand(a2)); |
__ li(a2, Operand(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting))); |
__ sd(a2, FieldMemOperand(a1, JSGeneratorObject::kContinuationOffset)); |
+ __ Move(v0, a1); // Continuation expects generator object in v0. |
__ Jump(a3); |
} |