From db2cb44b550f37d7dba83768b9ec395ec04ebbd1 Mon Sep 17 00:00:00 2001 From: "vegorov@chromium.org" Date: Tue, 26 Apr 2011 16:40:20 +0000 Subject: [PATCH] Fix an edge case in non-vfp3 version of TypeRecordingBinaryOpStub. Review URL: http://codereview.chromium.org/6903030 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/code-stubs-arm.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc index edc2741849..4cc5ef3475 100644 --- a/src/arm/code-stubs-arm.cc +++ b/src/arm/code-stubs-arm.cc @@ -2327,6 +2327,8 @@ void TypeRecordingBinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) { // Save the left value on the stack. __ Push(r5, r4); + Label pop_and_call_runtime; + // Allocate a heap number to store the result. heap_number_result = r5; GenerateHeapResultAllocation(masm, @@ -2334,7 +2336,7 @@ void TypeRecordingBinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) { heap_number_map, scratch1, scratch2, - &call_runtime); + &pop_and_call_runtime); // Load the left value from the value saved on the stack. __ Pop(r1, r0); @@ -2345,6 +2347,10 @@ void TypeRecordingBinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) { if (FLAG_debug_code) { __ stop("Unreachable code."); } + + __ bind(&pop_and_call_runtime); + __ Drop(2); + __ b(&call_runtime); } break;