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

Unified Diff: src/assembler.cc

Issue 1584663007: [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reduced generated code. Created 4 years, 11 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/assembler.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 784331738ee23f47cb9bc5cf9b796304f3e9a6d5..6bb8bc73eecab7e298d23375664d089696651b58 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -149,6 +149,7 @@ double minus_one_half;
double negative_infinity;
double the_hole_nan;
double uint32_bias;
+double rounding_limit;
};
static DoubleConstant double_constants;
@@ -950,6 +951,8 @@ void ExternalReference::SetUp() {
double_constants.negative_infinity = -V8_INFINITY;
double_constants.uint32_bias =
static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1;
+ // 2^52;
+ double_constants.rounding_limit = 4503599627370496.0;
math_exp_data_mutex = new base::Mutex();
}
@@ -1277,6 +1280,12 @@ ExternalReference ExternalReference::address_of_uint32_bias() {
}
+ExternalReference ExternalReference::address_of_rounding_limit() {
+ return ExternalReference(
+ reinterpret_cast<void*>(&double_constants.rounding_limit));
+}
+
+
ExternalReference ExternalReference::is_profiling_address(Isolate* isolate) {
return ExternalReference(isolate->cpu_profiler()->is_profiling_address());
}
« no previous file with comments | « src/assembler.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698