OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" |
6 | 6 |
7 #include "src/isolate-inl.h" | 7 #include "src/isolate-inl.h" |
8 | 8 |
9 #include "src/base/platform/elapsed-timer.h" | 9 #include "src/base/platform/elapsed-timer.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 case wasm::kExprF64Acos: { | 778 case wasm::kExprF64Acos: { |
779 return BuildF64Acos(input); | 779 return BuildF64Acos(input); |
780 } | 780 } |
781 case wasm::kExprF64Asin: { | 781 case wasm::kExprF64Asin: { |
782 return BuildF64Asin(input); | 782 return BuildF64Asin(input); |
783 } | 783 } |
784 case wasm::kExprF64Atan: | 784 case wasm::kExprF64Atan: |
785 op = m->Float64Atan(); | 785 op = m->Float64Atan(); |
786 break; | 786 break; |
787 case wasm::kExprF64Cos: { | 787 case wasm::kExprF64Cos: { |
788 return BuildF64Cos(input); | 788 op = m->Float64Cos(); |
| 789 break; |
789 } | 790 } |
790 case wasm::kExprF64Sin: { | 791 case wasm::kExprF64Sin: { |
791 return BuildF64Sin(input); | 792 op = m->Float64Sin(); |
| 793 break; |
792 } | 794 } |
793 case wasm::kExprF64Tan: { | 795 case wasm::kExprF64Tan: { |
794 return BuildF64Tan(input); | 796 op = m->Float64Tan(); |
| 797 break; |
795 } | 798 } |
796 case wasm::kExprF64Exp: { | 799 case wasm::kExprF64Exp: { |
797 return BuildF64Exp(input); | 800 op = m->Float64Exp(); |
| 801 break; |
798 } | 802 } |
799 case wasm::kExprF64Log: | 803 case wasm::kExprF64Log: |
800 op = m->Float64Log(); | 804 op = m->Float64Log(); |
801 break; | 805 break; |
802 case wasm::kExprI32ConvertI64: | 806 case wasm::kExprI32ConvertI64: |
803 op = m->TruncateInt64ToInt32(); | 807 op = m->TruncateInt64ToInt32(); |
804 break; | 808 break; |
805 case wasm::kExprI64SConvertI32: | 809 case wasm::kExprI64SConvertI32: |
806 op = m->ChangeInt32ToInt64(); | 810 op = m->ChangeInt32ToInt64(); |
807 break; | 811 break; |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 return BuildCFuncInstruction(ref, type, input); | 1345 return BuildCFuncInstruction(ref, type, input); |
1342 } | 1346 } |
1343 | 1347 |
1344 Node* WasmGraphBuilder::BuildF64Asin(Node* input) { | 1348 Node* WasmGraphBuilder::BuildF64Asin(Node* input) { |
1345 MachineType type = MachineType::Float64(); | 1349 MachineType type = MachineType::Float64(); |
1346 ExternalReference ref = | 1350 ExternalReference ref = |
1347 ExternalReference::f64_asin_wrapper_function(jsgraph()->isolate()); | 1351 ExternalReference::f64_asin_wrapper_function(jsgraph()->isolate()); |
1348 return BuildCFuncInstruction(ref, type, input); | 1352 return BuildCFuncInstruction(ref, type, input); |
1349 } | 1353 } |
1350 | 1354 |
1351 Node* WasmGraphBuilder::BuildF64Cos(Node* input) { | |
1352 MachineType type = MachineType::Float64(); | |
1353 ExternalReference ref = | |
1354 ExternalReference::f64_cos_wrapper_function(jsgraph()->isolate()); | |
1355 return BuildCFuncInstruction(ref, type, input); | |
1356 } | |
1357 | |
1358 Node* WasmGraphBuilder::BuildF64Sin(Node* input) { | |
1359 MachineType type = MachineType::Float64(); | |
1360 ExternalReference ref = | |
1361 ExternalReference::f64_sin_wrapper_function(jsgraph()->isolate()); | |
1362 return BuildCFuncInstruction(ref, type, input); | |
1363 } | |
1364 | |
1365 Node* WasmGraphBuilder::BuildF64Tan(Node* input) { | |
1366 MachineType type = MachineType::Float64(); | |
1367 ExternalReference ref = | |
1368 ExternalReference::f64_tan_wrapper_function(jsgraph()->isolate()); | |
1369 return BuildCFuncInstruction(ref, type, input); | |
1370 } | |
1371 | |
1372 Node* WasmGraphBuilder::BuildF64Exp(Node* input) { | |
1373 MachineType type = MachineType::Float64(); | |
1374 ExternalReference ref = | |
1375 ExternalReference::f64_exp_wrapper_function(jsgraph()->isolate()); | |
1376 return BuildCFuncInstruction(ref, type, input); | |
1377 } | |
1378 | |
1379 Node* WasmGraphBuilder::BuildF64Pow(Node* left, Node* right) { | 1355 Node* WasmGraphBuilder::BuildF64Pow(Node* left, Node* right) { |
1380 MachineType type = MachineType::Float64(); | 1356 MachineType type = MachineType::Float64(); |
1381 ExternalReference ref = | 1357 ExternalReference ref = |
1382 ExternalReference::f64_pow_wrapper_function(jsgraph()->isolate()); | 1358 ExternalReference::f64_pow_wrapper_function(jsgraph()->isolate()); |
1383 return BuildCFuncInstruction(ref, type, left, right); | 1359 return BuildCFuncInstruction(ref, type, left, right); |
1384 } | 1360 } |
1385 | 1361 |
1386 Node* WasmGraphBuilder::BuildF64Mod(Node* left, Node* right) { | 1362 Node* WasmGraphBuilder::BuildF64Mod(Node* left, Node* right) { |
1387 MachineType type = MachineType::Float64(); | 1363 MachineType type = MachineType::Float64(); |
1388 ExternalReference ref = | 1364 ExternalReference ref = |
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3287 function_->code_start_offset), | 3263 function_->code_start_offset), |
3288 compile_ms); | 3264 compile_ms); |
3289 } | 3265 } |
3290 | 3266 |
3291 return code; | 3267 return code; |
3292 } | 3268 } |
3293 | 3269 |
3294 } // namespace compiler | 3270 } // namespace compiler |
3295 } // namespace internal | 3271 } // namespace internal |
3296 } // namespace v8 | 3272 } // namespace v8 |
OLD | NEW |