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

Unified Diff: src/assembler.cc

Issue 2065503002: [builtins] Introduce proper Float64Atan and Float64Atan2 operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [WIP] Fix GCC/Win32. Created 4 years, 6 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/base/ieee754.h » ('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 8fe196cabb1b488e03cac430231879e5e447d12e..03859b5cb4c33ec39334bf534390c216ca54b2cd 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -1323,7 +1323,7 @@ ExternalReference ExternalReference::f64_asin_wrapper_function(
}
static void f64_atan_wrapper(double* param) {
- WriteDoubleValue(param, std::atan(ReadDoubleValue(param)));
+ WriteDoubleValue(param, base::ieee754::atan(ReadDoubleValue(param)));
}
ExternalReference ExternalReference::f64_atan_wrapper_function(
@@ -1392,7 +1392,7 @@ static void f64_atan2_wrapper(double* param0, double* param1) {
if (y < 0) multiplier *= 3;
WriteDoubleValue(param0, multiplier * kPiDividedBy4);
} else {
- WriteDoubleValue(param0, std::atan2(x, y));
+ WriteDoubleValue(param0, base::ieee754::atan2(x, y));
}
}
@@ -1648,6 +1648,16 @@ ExternalReference ExternalReference::address_of_regexp_stack_memory_size(
#endif // V8_INTERPRETED_REGEXP
+ExternalReference ExternalReference::ieee754_atan_function(Isolate* isolate) {
+ return ExternalReference(
+ Redirect(isolate, FUNCTION_ADDR(base::ieee754::atan), BUILTIN_FP_CALL));
+}
+
+ExternalReference ExternalReference::ieee754_atan2_function(Isolate* isolate) {
+ return ExternalReference(Redirect(
+ isolate, FUNCTION_ADDR(base::ieee754::atan2), BUILTIN_FP_FP_CALL));
+}
+
ExternalReference ExternalReference::ieee754_log_function(Isolate* isolate) {
return ExternalReference(
Redirect(isolate, FUNCTION_ADDR(base::ieee754::log), BUILTIN_FP_CALL));
« no previous file with comments | « src/assembler.h ('k') | src/base/ieee754.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698