From bbb264846476f6f8f1675ec9cd98bb4774a0f765 Mon Sep 17 00:00:00 2001 From: "sgjesse@chromium.org" Date: Wed, 30 Jun 2010 13:39:03 +0000 Subject: [PATCH] ARM: Fix GC bug with previous change The change in r4990 contained a bug in Math.pow. One of the arguments for the call to runtime where clobbered if allocation of the heap number for the result failed. Caught by a couple of Mozilla tests which does a lot of calls to Math.pow. Fix presubmit error in x64. Review URL: http://codereview.chromium.org/2847037 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/codegen-arm.cc | 6 ++++-- src/x64/codegen-x64.cc | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc index fb3d8b8..1565c74 100644 --- a/src/arm/codegen-arm.cc +++ b/src/arm/codegen-arm.cc @@ -4402,8 +4402,10 @@ void CodeGenerator::GenerateMathPow(ZoneList* args) { __ vsqrt(d0, d0); __ bind(&allocate_return); - __ AllocateHeapNumberWithValue( - base, d0, scratch1, scratch2, heap_number_map, runtime.entry_label()); + Register scratch3 = r5; + __ AllocateHeapNumberWithValue(scratch3, d0, scratch1, scratch2, + heap_number_map, runtime.entry_label()); + __ mov(base, scratch3); done.Jump(); runtime.Bind(); diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc index 2860768..d58dd02 100644 --- a/src/x64/codegen-x64.cc +++ b/src/x64/codegen-x64.cc @@ -9113,7 +9113,8 @@ void CompareStub::Generate(MacroAssembler* masm) { __ bind(&check_for_strings); - __ JumpIfNotBothSequentialAsciiStrings(rdx, rax, rcx, rbx, &check_unequal_objects); + __ JumpIfNotBothSequentialAsciiStrings( + rdx, rax, rcx, rbx, &check_unequal_objects); // Inline comparison of ascii strings. StringCompareStub::GenerateCompareFlatAsciiStrings(masm, -- 2.7.4