Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Unified Diff: src/arm64/macro-assembler-arm64.cc

Issue 1884193002: [arm64] Turn off the default NaN mode on arm64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698