Index: src/x87/builtins-x87.cc |
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc |
index a8aa7e11812784ff78c442b4176843edb789a2cf..cd7568c75c5645c6be44ebb6c98c52be38d57aa0 100644 |
--- a/src/x87/builtins-x87.cc |
+++ b/src/x87/builtins-x87.cc |
@@ -752,9 +752,14 @@ void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { |
// Leave the frame (also dropping the register file). |
__ leave(); |
- // Return droping receiver + arguments. |
- // TODO(rmcilroy): Get number of arguments from BytecodeArray. |
- __ Ret(1 * kPointerSize, ecx); |
+ |
+ // Drop receiver + arguments and return. |
+ __ mov(ebx, FieldOperand(kInterpreterBytecodeArrayRegister, |
+ BytecodeArray::kParameterSizeOffset)); |
+ __ pop(ecx); |
+ __ add(esp, ebx); |
+ __ push(ecx); |
+ __ ret(0); |
} |