From f5fb75ce09505e0c9ed90f6f75cf36361294d718 Mon Sep 17 00:00:00 2001 From: "sgjesse@chromium.org" Date: Wed, 5 Jan 2011 12:06:32 +0000 Subject: [PATCH] Fix comparison bug on ARM. Retrieves the result of VFP comparison from the VFP status register. BUG=none TEST=none Patch by Martyn Capewell from ARM Ltd. Review URL: http://codereview.chromium.org/6020014 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/lithium-codegen-arm.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index 711d0ca3c8..bac1db4de3 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -1077,6 +1077,7 @@ void LCodeGen::DoBranch(LBranch* instr) { } else if (r.IsDouble()) { DoubleRegister reg = ToDoubleRegister(instr->input()); __ vcmp(reg, 0.0); + __ vmrs(pc); // Move vector status bits to normal status bits. EmitBranch(true_block, false_block, ne); } else { ASSERT(r.IsTagged()); @@ -1114,6 +1115,7 @@ void LCodeGen::DoBranch(LBranch* instr) { __ sub(ip, reg, Operand(kHeapObjectTag)); __ vldr(dbl_scratch, ip, HeapNumber::kValueOffset); __ vcmp(dbl_scratch, 0.0); + __ vmrs(pc); // Move vector status bits to normal status bits. __ b(eq, false_label); __ b(true_label);