Commit f5fb75ce authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

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
parent 0cd558a3
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment