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

Side by Side Diff: src/assembler.cc

Issue 1738623003: [wasm] Int64Lowering of FXXXConvertI64 instructions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase. Created 4 years, 9 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/int64-lowering.h » ('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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "src/interpreter/interpreter.h" 54 #include "src/interpreter/interpreter.h"
55 #include "src/ostreams.h" 55 #include "src/ostreams.h"
56 #include "src/profiler/cpu-profiler.h" 56 #include "src/profiler/cpu-profiler.h"
57 #include "src/regexp/jsregexp.h" 57 #include "src/regexp/jsregexp.h"
58 #include "src/regexp/regexp-macro-assembler.h" 58 #include "src/regexp/regexp-macro-assembler.h"
59 #include "src/regexp/regexp-stack.h" 59 #include "src/regexp/regexp-stack.h"
60 #include "src/register-configuration.h" 60 #include "src/register-configuration.h"
61 #include "src/runtime/runtime.h" 61 #include "src/runtime/runtime.h"
62 #include "src/simulator.h" // For flushing instruction cache. 62 #include "src/simulator.h" // For flushing instruction cache.
63 #include "src/snapshot/serializer-common.h" 63 #include "src/snapshot/serializer-common.h"
64 #include "src/wasm/wasm-external-refs.h"
64 65
65 #if V8_TARGET_ARCH_IA32 66 #if V8_TARGET_ARCH_IA32
66 #include "src/ia32/assembler-ia32-inl.h" // NOLINT 67 #include "src/ia32/assembler-ia32-inl.h" // NOLINT
67 #elif V8_TARGET_ARCH_X64 68 #elif V8_TARGET_ARCH_X64
68 #include "src/x64/assembler-x64-inl.h" // NOLINT 69 #include "src/x64/assembler-x64-inl.h" // NOLINT
69 #elif V8_TARGET_ARCH_ARM64 70 #elif V8_TARGET_ARCH_ARM64
70 #include "src/arm64/assembler-arm64-inl.h" // NOLINT 71 #include "src/arm64/assembler-arm64-inl.h" // NOLINT
71 #elif V8_TARGET_ARCH_ARM 72 #elif V8_TARGET_ARCH_ARM
72 #include "src/arm/assembler-arm-inl.h" // NOLINT 73 #include "src/arm/assembler-arm-inl.h" // NOLINT
73 #elif V8_TARGET_ARCH_PPC 74 #elif V8_TARGET_ARCH_PPC
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::New))); 1141 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::New)));
1141 } 1142 }
1142 1143
1143 1144
1144 ExternalReference ExternalReference::compute_output_frames_function( 1145 ExternalReference ExternalReference::compute_output_frames_function(
1145 Isolate* isolate) { 1146 Isolate* isolate) {
1146 return ExternalReference( 1147 return ExternalReference(
1147 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::ComputeOutputFrames))); 1148 Redirect(isolate, FUNCTION_ADDR(Deoptimizer::ComputeOutputFrames)));
1148 } 1149 }
1149 1150
1150 static void f32_trunc_wrapper(float* param) { *param = truncf(*param); } 1151 ExternalReference ExternalReference::wasm_f32_trunc(Isolate* isolate) {
1151 1152 return ExternalReference(
1152 ExternalReference ExternalReference::f32_trunc_wrapper_function( 1153 Redirect(isolate, FUNCTION_ADDR(wasm::f32_trunc_wrapper)));
1153 Isolate* isolate) { 1154 }
1154 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f32_trunc_wrapper))); 1155 ExternalReference ExternalReference::wasm_f32_floor(Isolate* isolate) {
1156 return ExternalReference(
1157 Redirect(isolate, FUNCTION_ADDR(wasm::f32_floor_wrapper)));
1158 }
1159 ExternalReference ExternalReference::wasm_f32_ceil(Isolate* isolate) {
1160 return ExternalReference(
1161 Redirect(isolate, FUNCTION_ADDR(wasm::f32_ceil_wrapper)));
1162 }
1163 ExternalReference ExternalReference::wasm_f32_nearest_int(Isolate* isolate) {
1164 return ExternalReference(
1165 Redirect(isolate, FUNCTION_ADDR(wasm::f32_nearest_int_wrapper)));
1155 } 1166 }
1156 1167
1157 static void f32_floor_wrapper(float* param) { *param = floorf(*param); } 1168 ExternalReference ExternalReference::wasm_f64_trunc(Isolate* isolate) {
1158 1169 return ExternalReference(
1159 ExternalReference ExternalReference::f32_floor_wrapper_function( 1170 Redirect(isolate, FUNCTION_ADDR(wasm::f64_trunc_wrapper)));
1160 Isolate* isolate) {
1161 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f32_floor_wrapper)));
1162 } 1171 }
1163 1172
1164 static void f32_ceil_wrapper(float* param) { *param = ceilf(*param); } 1173 ExternalReference ExternalReference::wasm_f64_floor(Isolate* isolate) {
1165 1174 return ExternalReference(
1166 ExternalReference ExternalReference::f32_ceil_wrapper_function( 1175 Redirect(isolate, FUNCTION_ADDR(wasm::f64_floor_wrapper)));
1167 Isolate* isolate) {
1168 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f32_ceil_wrapper)));
1169 } 1176 }
1170 1177
1171 static void f32_nearest_int_wrapper(float* param) { 1178 ExternalReference ExternalReference::wasm_f64_ceil(Isolate* isolate) {
1172 *param = nearbyintf(*param); 1179 return ExternalReference(
1180 Redirect(isolate, FUNCTION_ADDR(wasm::f64_ceil_wrapper)));
1173 } 1181 }
1174 1182
1175 ExternalReference ExternalReference::f32_nearest_int_wrapper_function( 1183 ExternalReference ExternalReference::wasm_f64_nearest_int(Isolate* isolate) {
1176 Isolate* isolate) {
1177 return ExternalReference( 1184 return ExternalReference(
1178 Redirect(isolate, FUNCTION_ADDR(f32_nearest_int_wrapper))); 1185 Redirect(isolate, FUNCTION_ADDR(wasm::f64_nearest_int_wrapper)));
1179 } 1186 }
1180 1187
1181 static void f64_trunc_wrapper(double* param) { *param = trunc(*param); } 1188 ExternalReference ExternalReference::wasm_int64_to_float32(Isolate* isolate) {
1182 1189 return ExternalReference(
1183 ExternalReference ExternalReference::f64_trunc_wrapper_function( 1190 Redirect(isolate, FUNCTION_ADDR(wasm::int64_to_float32_wrapper)));
1184 Isolate* isolate) {
1185 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_trunc_wrapper)));
1186 } 1191 }
1187 1192
1188 static void f64_floor_wrapper(double* param) { *param = floor(*param); } 1193 ExternalReference ExternalReference::wasm_uint64_to_float32(Isolate* isolate) {
1189 1194 return ExternalReference(
1190 ExternalReference ExternalReference::f64_floor_wrapper_function( 1195 Redirect(isolate, FUNCTION_ADDR(wasm::uint64_to_float32_wrapper)));
1191 Isolate* isolate) {
1192 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_floor_wrapper)));
1193 } 1196 }
1194 1197
1195 static void f64_ceil_wrapper(double* param) { *param = ceil(*param); } 1198 ExternalReference ExternalReference::wasm_int64_to_float64(Isolate* isolate) {
1196 1199 return ExternalReference(
1197 ExternalReference ExternalReference::f64_ceil_wrapper_function( 1200 Redirect(isolate, FUNCTION_ADDR(wasm::int64_to_float64_wrapper)));
1198 Isolate* isolate) {
1199 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_ceil_wrapper)));
1200 } 1201 }
1201 1202
1202 static void f64_nearest_int_wrapper(double* param) { 1203 ExternalReference ExternalReference::wasm_uint64_to_float64(Isolate* isolate) {
1203 *param = nearbyint(*param);
1204 }
1205
1206 ExternalReference ExternalReference::f64_nearest_int_wrapper_function(
1207 Isolate* isolate) {
1208 return ExternalReference( 1204 return ExternalReference(
1209 Redirect(isolate, FUNCTION_ADDR(f64_nearest_int_wrapper))); 1205 Redirect(isolate, FUNCTION_ADDR(wasm::uint64_to_float64_wrapper)));
1210 } 1206 }
1211 1207
1212 static void f64_acos_wrapper(double* param) { *param = std::acos(*param); } 1208 static void f64_acos_wrapper(double* param) { *param = std::acos(*param); }
1213 1209
1214 ExternalReference ExternalReference::f64_acos_wrapper_function( 1210 ExternalReference ExternalReference::f64_acos_wrapper_function(
1215 Isolate* isolate) { 1211 Isolate* isolate) {
1216 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_acos_wrapper))); 1212 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(f64_acos_wrapper)));
1217 } 1213 }
1218 1214
1219 static void f64_asin_wrapper(double* param) { *param = std::asin(*param); } 1215 static void f64_asin_wrapper(double* param) { *param = std::asin(*param); }
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2031 2027
2032 2028
2033 void Assembler::DataAlign(int m) { 2029 void Assembler::DataAlign(int m) {
2034 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 2030 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
2035 while ((pc_offset() & (m - 1)) != 0) { 2031 while ((pc_offset() & (m - 1)) != 0) {
2036 db(0); 2032 db(0);
2037 } 2033 }
2038 } 2034 }
2039 } // namespace internal 2035 } // namespace internal
2040 } // namespace v8 2036 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/compiler/int64-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698