PPC: Fix NaN Canonicalization.

Use fsub rather than fadd to avoid stripping the sign from minus zero.

Fixes mjsunit/result-table-min and mjsunit/result-table-max test failures.

R=michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1084583003

Cr-Commit-Position: refs/heads/master@{#27794}
This commit is contained in:
mbrandy 2015-04-13 09:24:31 -07:00 committed by Commit bot
parent e0844a24d3
commit c7f40ce738

View File

@ -602,7 +602,7 @@ MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) {
void MacroAssembler::CanonicalizeNaN(const DoubleRegister dst,
const DoubleRegister src) {
// Turn potential sNaN into qNaN.
fadd(dst, src, kDoubleRegZero);
fsub(dst, src, kDoubleRegZero);
}