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

Side by Side Diff: src/assembler.cc

Issue 2116753002: [builtins] Unify most of the remaining Math builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2102223005
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 return ExternalReference( 1135 return ExternalReference(
1136 Redirect(isolate, FUNCTION_ADDR(wasm::word32_popcnt_wrapper))); 1136 Redirect(isolate, FUNCTION_ADDR(wasm::word32_popcnt_wrapper)));
1137 } 1137 }
1138 1138
1139 ExternalReference ExternalReference::wasm_word64_popcnt(Isolate* isolate) { 1139 ExternalReference ExternalReference::wasm_word64_popcnt(Isolate* isolate) {
1140 return ExternalReference( 1140 return ExternalReference(
1141 Redirect(isolate, FUNCTION_ADDR(wasm::word64_popcnt_wrapper))); 1141 Redirect(isolate, FUNCTION_ADDR(wasm::word64_popcnt_wrapper)));
1142 } 1142 }
1143 1143
1144 static void f64_acos_wrapper(double* param) { 1144 static void f64_acos_wrapper(double* param) {
1145 WriteDoubleValue(param, std::acos(ReadDoubleValue(param))); 1145 WriteDoubleValue(param, base::ieee754::acos(ReadDoubleValue(param)));
1146 } 1146 }
1147 1147
1148 ExternalReference ExternalReference::f64_acos_wrapper_function( 1148 ExternalReference ExternalReference::f64_acos_wrapper_function(
1149 Isolate* isolate) { 1149 Isolate* isolate) {
1150 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_acos_wrapper))); 1150 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_acos_wrapper)));
1151 } 1151 }
1152 1152
1153 static void f64_asin_wrapper(double* param) { 1153 static void f64_asin_wrapper(double* param) {
1154 WriteDoubleValue(param, std::asin(ReadDoubleValue(param))); 1154 WriteDoubleValue(param, base::ieee754::asin(ReadDoubleValue(param)));
1155 } 1155 }
1156 1156
1157 ExternalReference ExternalReference::f64_asin_wrapper_function( 1157 ExternalReference ExternalReference::f64_asin_wrapper_function(
1158 Isolate* isolate) { 1158 Isolate* isolate) {
1159 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_asin_wrapper))); 1159 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_asin_wrapper)));
1160 } 1160 }
1161 1161
1162 static void f64_mod_wrapper(double* param0, double* param1) { 1162 static void f64_mod_wrapper(double* param0, double* param1) {
1163 WriteDoubleValue(param0, 1163 WriteDoubleValue(param0,
1164 modulo(ReadDoubleValue(param0), ReadDoubleValue(param1))); 1164 modulo(ReadDoubleValue(param0), ReadDoubleValue(param1)));
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 isolate->regexp_stack()->memory_address()); 1399 isolate->regexp_stack()->memory_address());
1400 } 1400 }
1401 1401
1402 ExternalReference ExternalReference::address_of_regexp_stack_memory_size( 1402 ExternalReference ExternalReference::address_of_regexp_stack_memory_size(
1403 Isolate* isolate) { 1403 Isolate* isolate) {
1404 return ExternalReference(isolate->regexp_stack()->memory_size_address()); 1404 return ExternalReference(isolate->regexp_stack()->memory_size_address());
1405 } 1405 }
1406 1406
1407 #endif // V8_INTERPRETED_REGEXP 1407 #endif // V8_INTERPRETED_REGEXP
1408 1408
1409 ExternalReference ExternalReference::ieee754_acos_function(Isolate* isolate) {
1410 return ExternalReference(
1411 Redirect(isolate, FUNCTION_ADDR(base::ieee754::acos), BUILTIN_FP_CALL));
1412 }
1413
1414 ExternalReference ExternalReference::ieee754_acosh_function(Isolate* isolate) {
1415 return ExternalReference(Redirect(
1416 isolate, FUNCTION_ADDR(base::ieee754::acosh), BUILTIN_FP_FP_CALL));
1417 }
1418
1419 ExternalReference ExternalReference::ieee754_asin_function(Isolate* isolate) {
1420 return ExternalReference(
1421 Redirect(isolate, FUNCTION_ADDR(base::ieee754::asin), BUILTIN_FP_CALL));
1422 }
1423
1424 ExternalReference ExternalReference::ieee754_asinh_function(Isolate* isolate) {
1425 return ExternalReference(Redirect(
1426 isolate, FUNCTION_ADDR(base::ieee754::asinh), BUILTIN_FP_FP_CALL));
1427 }
1428
1409 ExternalReference ExternalReference::ieee754_atan_function(Isolate* isolate) { 1429 ExternalReference ExternalReference::ieee754_atan_function(Isolate* isolate) {
1410 return ExternalReference( 1430 return ExternalReference(
1411 Redirect(isolate, FUNCTION_ADDR(base::ieee754::atan), BUILTIN_FP_CALL)); 1431 Redirect(isolate, FUNCTION_ADDR(base::ieee754::atan), BUILTIN_FP_CALL));
1412 } 1432 }
1413 1433
1414 ExternalReference ExternalReference::ieee754_atan2_function(Isolate* isolate) {
1415 return ExternalReference(Redirect(
1416 isolate, FUNCTION_ADDR(base::ieee754::atan2), BUILTIN_FP_FP_CALL));
1417 }
1418
1419 ExternalReference ExternalReference::ieee754_atanh_function(Isolate* isolate) { 1434 ExternalReference ExternalReference::ieee754_atanh_function(Isolate* isolate) {
1420 return ExternalReference(Redirect( 1435 return ExternalReference(Redirect(
1421 isolate, FUNCTION_ADDR(base::ieee754::atanh), BUILTIN_FP_FP_CALL)); 1436 isolate, FUNCTION_ADDR(base::ieee754::atanh), BUILTIN_FP_FP_CALL));
1422 } 1437 }
1423 1438
1439 ExternalReference ExternalReference::ieee754_atan2_function(Isolate* isolate) {
1440 return ExternalReference(Redirect(
1441 isolate, FUNCTION_ADDR(base::ieee754::atan2), BUILTIN_FP_FP_CALL));
1442 }
1443
1424 ExternalReference ExternalReference::ieee754_cbrt_function(Isolate* isolate) { 1444 ExternalReference ExternalReference::ieee754_cbrt_function(Isolate* isolate) {
1425 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(base::ieee754::cbrt), 1445 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(base::ieee754::cbrt),
1426 BUILTIN_FP_FP_CALL)); 1446 BUILTIN_FP_FP_CALL));
1427 } 1447 }
1428 1448
1429 ExternalReference ExternalReference::ieee754_cos_function(Isolate* isolate) { 1449 ExternalReference ExternalReference::ieee754_cos_function(Isolate* isolate) {
1430 return ExternalReference( 1450 return ExternalReference(
1431 Redirect(isolate, FUNCTION_ADDR(base::ieee754::cos), BUILTIN_FP_CALL)); 1451 Redirect(isolate, FUNCTION_ADDR(base::ieee754::cos), BUILTIN_FP_CALL));
1432 } 1452 }
1433 1453
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 1895
1876 1896
1877 void Assembler::DataAlign(int m) { 1897 void Assembler::DataAlign(int m) {
1878 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 1898 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1879 while ((pc_offset() & (m - 1)) != 0) { 1899 while ((pc_offset() & (m - 1)) != 0) {
1880 db(0); 1900 db(0);
1881 } 1901 }
1882 } 1902 }
1883 } // namespace internal 1903 } // namespace internal
1884 } // namespace v8 1904 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/base/ieee754.h » ('j') | src/bootstrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698