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

Side by Side Diff: src/assembler.cc

Issue 1661463002: [wasm] Provide backoff implementations for the Fxx rounding instructions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@trunc64-external-reference
Patch Set: rebase. 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 unified diff | Download patch
« no previous file with comments | « src/assembler.h ('k') | src/compiler/fast-accessor-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::New))); 1125 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::New)));
1126 } 1126 }
1127 1127
1128 1128
1129 ExternalReference ExternalReference::compute_output_frames_function( 1129 ExternalReference ExternalReference::compute_output_frames_function(
1130 Isolate* isolate) { 1130 Isolate* isolate) {
1131 return ExternalReference( 1131 return ExternalReference(
1132 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::ComputeOutputFrames))); 1132 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::ComputeOutputFrames)));
1133 } 1133 }
1134 1134
1135 static void trunc64_wrapper(double* param) { *param = trunc(*param); } 1135 static void f32_trunc_wrapper(float* param) { *param = truncf(*param); }
1136 1136
1137 ExternalReference ExternalReference::trunc64_wrapper_function( 1137 ExternalReference ExternalReference::f32_trunc_wrapper_function(
1138 Isolate* isolate) { 1138 Isolate* isolate) {
1139 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(trunc64_wrapper))); 1139 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f32_trunc_wrapper)));
1140 }
1141
1142 static void f32_floor_wrapper(float* param) { *param = floorf(*param); }
1143
1144 ExternalReference ExternalReference::f32_floor_wrapper_function(
1145 Isolate* isolate) {
1146 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f32_floor_wrapper)));
1147 }
1148
1149 static void f32_ceil_wrapper(float* param) { *param = ceilf(*param); }
1150
1151 ExternalReference ExternalReference::f32_ceil_wrapper_function(
1152 Isolate* isolate) {
1153 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f32_ceil_wrapper)));
1154 }
1155
1156 static void f32_nearest_int_wrapper(float* param) {
1157 *param = nearbyintf(*param);
1158 }
1159
1160 ExternalReference ExternalReference::f32_nearest_int_wrapper_function(
1161 Isolate* isolate) {
1162 return ExternalReference(
1163 Redirect(isolate, FUNCTION_ADDR(f32_nearest_int_wrapper)));
1164 }
1165
1166 static void f64_trunc_wrapper(double* param) { *param = trunc(*param); }
1167
1168 ExternalReference ExternalReference::f64_trunc_wrapper_function(
1169 Isolate* isolate) {
1170 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_trunc_wrapper)));
1171 }
1172
1173 static void f64_floor_wrapper(double* param) { *param = floor(*param); }
1174
1175 ExternalReference ExternalReference::f64_floor_wrapper_function(
1176 Isolate* isolate) {
1177 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_floor_wrapper)));
1178 }
1179
1180 static void f64_ceil_wrapper(double* param) { *param = ceil(*param); }
1181
1182 ExternalReference ExternalReference::f64_ceil_wrapper_function(
1183 Isolate* isolate) {
1184 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_ceil_wrapper)));
1185 }
1186
1187 static void f64_nearest_int_wrapper(double* param) {
1188 *param = nearbyint(*param);
1189 }
1190
1191 ExternalReference ExternalReference::f64_nearest_int_wrapper_function(
1192 Isolate* isolate) {
1193 return ExternalReference(
1194 Redirect(isolate, FUNCTION_ADDR(f64_nearest_int_wrapper)));
1140 } 1195 }
1141 1196
1142 ExternalReference ExternalReference::log_enter_external_function( 1197 ExternalReference ExternalReference::log_enter_external_function(
1143 Isolate* isolate) { 1198 Isolate* isolate) {
1144 return ExternalReference( 1199 return ExternalReference(
1145 Redirect(isolate, FUNCTION_ADDR(Logger::EnterExternal))); 1200 Redirect(isolate, FUNCTION_ADDR(Logger::EnterExternal)));
1146 } 1201 }
1147 1202
1148 1203
1149 ExternalReference ExternalReference::log_leave_external_function( 1204 ExternalReference ExternalReference::log_leave_external_function(
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 1927
1873 1928
1874 void Assembler::DataAlign(int m) { 1929 void Assembler::DataAlign(int m) {
1875 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 1930 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1876 while ((pc_offset() & (m - 1)) != 0) { 1931 while ((pc_offset() & (m - 1)) != 0) {
1877 db(0); 1932 db(0);
1878 } 1933 }
1879 } 1934 }
1880 } // namespace internal 1935 } // namespace internal
1881 } // namespace v8 1936 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/compiler/fast-accessor-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698