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
This commit is contained in:
parent
0cd558a355
commit
f5fb75ce09
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user