Commit c7f40ce7 authored by mbrandy's avatar mbrandy Committed by Commit bot

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