From 41db9af665444b1d9cd7fe0553713444de68a92d Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Tue, 12 Nov 2013 15:11:06 +0000 Subject: [PATCH] Fix implementation of compare-minus-zero-and-branch on ia32 and x64. R=jkummerow@chromium.org BUG= Review URL: https://codereview.chromium.org/63573004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/ia32/lithium-codegen-ia32.cc | 2 +- src/x64/lithium-codegen-x64.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index 14a40baa19..bc46113cc8 100644 --- a/src/ia32/lithium-codegen-ia32.cc +++ b/src/ia32/lithium-codegen-ia32.cc @@ -2689,7 +2689,7 @@ void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { } else { Register value = ToRegister(instr->value()); Handle map = masm()->isolate()->factory()->heap_number_map(); - __ CheckMap(eax, map, &if_false, DO_SMI_CHECK); + __ CheckMap(value, map, &if_false, DO_SMI_CHECK); __ cmp(FieldOperand(value, HeapNumber::kExponentOffset), Immediate(0x80000000)); __ j(not_equal, &if_false); diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc index 5e2367f986..986cf833a4 100644 --- a/src/x64/lithium-codegen-x64.cc +++ b/src/x64/lithium-codegen-x64.cc @@ -2263,7 +2263,7 @@ void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { } else { Register value = ToRegister(instr->value()); Handle map = masm()->isolate()->factory()->heap_number_map(); - __ CheckMap(rax, map, &if_false, DO_SMI_CHECK); + __ CheckMap(value, map, &if_false, DO_SMI_CHECK); __ cmpl(FieldOperand(value, HeapNumber::kExponentOffset), Immediate(0x80000000)); __ j(not_equal, &if_false);