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

Unified Diff: src/compiler/arm/code-generator-arm.cc

Issue 1758003003: [turbofan] ARM: Reduce out-of-line NaN code size (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/arm/simulator-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/arm/code-generator-arm.cc
diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc
index 5c94ccf7c3b2d07bb6ce1b379cf99d14135080db..ddba29d2d68dc3edf3a317600d92ff5fe607ea82 100644
--- a/src/compiler/arm/code-generator-arm.cc
+++ b/src/compiler/arm/code-generator-arm.cc
@@ -165,7 +165,9 @@ class OutOfLineLoadFloat32 final : public OutOfLineCode {
: OutOfLineCode(gen), result_(result) {}
void Generate() final {
- __ vmov(result_, std::numeric_limits<float>::quiet_NaN());
+ // Compute sqrtf(-1.0f), which results in a quiet single-precision NaN.
+ __ vmov(result_, -1.0f);
+ __ vsqrt(result_, result_);
}
private:
@@ -179,7 +181,9 @@ class OutOfLineLoadFloat64 final : public OutOfLineCode {
: OutOfLineCode(gen), result_(result) {}
void Generate() final {
- __ vmov(result_, std::numeric_limits<double>::quiet_NaN(), kScratchReg);
+ // Compute sqrt(-1.0), which results in a quiet double-precision NaN.
+ __ vmov(result_, -1.0);
+ __ vsqrt(result_, result_);
}
private:
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698