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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 } | 789 } |
790 case wasm::kExprF64Sin: { | 790 case wasm::kExprF64Sin: { |
791 return BuildF64Sin(input); | 791 return BuildF64Sin(input); |
792 } | 792 } |
793 case wasm::kExprF64Tan: { | 793 case wasm::kExprF64Tan: { |
794 return BuildF64Tan(input); | 794 return BuildF64Tan(input); |
795 } | 795 } |
796 case wasm::kExprF64Exp: { | 796 case wasm::kExprF64Exp: { |
797 return BuildF64Exp(input); | 797 return BuildF64Exp(input); |
798 } | 798 } |
799 case wasm::kExprF64Log: { | 799 case wasm::kExprF64Log: |
800 return BuildF64Log(input); | 800 op = m->Float64Log(); |
801 } | 801 break; |
802 case wasm::kExprI32ConvertI64: | 802 case wasm::kExprI32ConvertI64: |
803 op = m->TruncateInt64ToInt32(); | 803 op = m->TruncateInt64ToInt32(); |
804 break; | 804 break; |
805 case wasm::kExprI64SConvertI32: | 805 case wasm::kExprI64SConvertI32: |
806 op = m->ChangeInt32ToInt64(); | 806 op = m->ChangeInt32ToInt64(); |
807 break; | 807 break; |
808 case wasm::kExprI64UConvertI32: | 808 case wasm::kExprI64UConvertI32: |
809 op = m->ChangeUint32ToUint64(); | 809 op = m->ChangeUint32ToUint64(); |
810 break; | 810 break; |
811 case wasm::kExprF64ReinterpretI64: | 811 case wasm::kExprF64ReinterpretI64: |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 return BuildCFuncInstruction(ref, type, input); | 1376 return BuildCFuncInstruction(ref, type, input); |
1377 } | 1377 } |
1378 | 1378 |
1379 Node* WasmGraphBuilder::BuildF64Exp(Node* input) { | 1379 Node* WasmGraphBuilder::BuildF64Exp(Node* input) { |
1380 MachineType type = MachineType::Float64(); | 1380 MachineType type = MachineType::Float64(); |
1381 ExternalReference ref = | 1381 ExternalReference ref = |
1382 ExternalReference::f64_exp_wrapper_function(jsgraph()->isolate()); | 1382 ExternalReference::f64_exp_wrapper_function(jsgraph()->isolate()); |
1383 return BuildCFuncInstruction(ref, type, input); | 1383 return BuildCFuncInstruction(ref, type, input); |
1384 } | 1384 } |
1385 | 1385 |
1386 Node* WasmGraphBuilder::BuildF64Log(Node* input) { | |
1387 MachineType type = MachineType::Float64(); | |
1388 ExternalReference ref = | |
1389 ExternalReference::f64_log_wrapper_function(jsgraph()->isolate()); | |
1390 return BuildCFuncInstruction(ref, type, input); | |
1391 } | |
1392 | |
1393 Node* WasmGraphBuilder::BuildF64Atan2(Node* left, Node* right) { | 1386 Node* WasmGraphBuilder::BuildF64Atan2(Node* left, Node* right) { |
1394 MachineType type = MachineType::Float64(); | 1387 MachineType type = MachineType::Float64(); |
1395 ExternalReference ref = | 1388 ExternalReference ref = |
1396 ExternalReference::f64_atan2_wrapper_function(jsgraph()->isolate()); | 1389 ExternalReference::f64_atan2_wrapper_function(jsgraph()->isolate()); |
1397 return BuildCFuncInstruction(ref, type, left, right); | 1390 return BuildCFuncInstruction(ref, type, left, right); |
1398 } | 1391 } |
1399 | 1392 |
1400 Node* WasmGraphBuilder::BuildF64Pow(Node* left, Node* right) { | 1393 Node* WasmGraphBuilder::BuildF64Pow(Node* left, Node* right) { |
1401 MachineType type = MachineType::Float64(); | 1394 MachineType type = MachineType::Float64(); |
1402 ExternalReference ref = | 1395 ExternalReference ref = |
(...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3305 function_->code_start_offset), | 3298 function_->code_start_offset), |
3306 compile_ms); | 3299 compile_ms); |
3307 } | 3300 } |
3308 | 3301 |
3309 return code; | 3302 return code; |
3310 } | 3303 } |
3311 | 3304 |
3312 } // namespace compiler | 3305 } // namespace compiler |
3313 } // namespace internal | 3306 } // namespace internal |
3314 } // namespace v8 | 3307 } // namespace v8 |
OLD | NEW |