Index: src/arm64/macro-assembler-arm64.cc |
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc |
index bd7ff3d7210688aa6bc44ea061ccbede8a375e3c..dd98c2bfcf6915bb5d535add150c7bae9ae84523 100644 |
--- a/src/arm64/macro-assembler-arm64.cc |
+++ b/src/arm64/macro-assembler-arm64.cc |
@@ -1373,10 +1373,6 @@ void MacroAssembler::AssertFPCRState(Register fpcr) { |
Mrs(fpcr, FPCR); |
} |
- // Settings overridden by ConfiugreFPCR(): |
- // - Assert that default-NaN mode is set. |
- Tbz(fpcr, DN_offset, &unexpected_mode); |
- |
// Settings left to their default values: |
// - Assert that flush-to-zero is not set. |
Tbnz(fpcr, FZ_offset, &unexpected_mode); |
@@ -1393,31 +1389,13 @@ void MacroAssembler::AssertFPCRState(Register fpcr) { |
} |
-void MacroAssembler::ConfigureFPCR() { |
- UseScratchRegisterScope temps(this); |
- Register fpcr = temps.AcquireX(); |
- Mrs(fpcr, FPCR); |
- |
- // If necessary, enable default-NaN mode. The default values of the other FPCR |
- // options should be suitable, and AssertFPCRState will verify that. |
- Label no_write_required; |
- Tbnz(fpcr, DN_offset, &no_write_required); |
- |
- Orr(fpcr, fpcr, DN_mask); |
- Msr(FPCR, fpcr); |
- |
- Bind(&no_write_required); |
- AssertFPCRState(fpcr); |
-} |
- |
- |
void MacroAssembler::CanonicalizeNaN(const FPRegister& dst, |
const FPRegister& src) { |
AssertFPCRState(); |
- // With DN=1 and RMode=FPTieEven, subtracting 0.0 preserves all inputs except |
- // for NaNs, which become the default NaN. We use fsub rather than fadd |
- // because sub preserves -0.0 inputs: -0.0 + 0.0 = 0.0, but -0.0 - 0.0 = -0.0. |
+ // Subtracting 0.0 preserves all inputs except for signalling NaNs, which |
+ // become quiet NaNs. We use fsub rather than fadd because fsub preserves -0.0 |
+ // inputs: -0.0 + 0.0 = 0.0, but -0.0 - 0.0 = -0.0. |
Fsub(dst, src, fp_zero); |
} |