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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/assembler-inl.h" | 9 #include "src/assembler-inl.h" |
10 #include "src/base/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
(...skipping 3592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3603 return graph()->NewNode( | 3603 return graph()->NewNode( |
3604 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[1], | 3604 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[1], |
3605 inputs[0]); | 3605 inputs[0]); |
3606 case wasm::kExprI8x16GtU: | 3606 case wasm::kExprI8x16GtU: |
3607 return graph()->NewNode(jsgraph()->machine()->Uint8x16GreaterThan(), | 3607 return graph()->NewNode(jsgraph()->machine()->Uint8x16GreaterThan(), |
3608 inputs[0], inputs[1]); | 3608 inputs[0], inputs[1]); |
3609 case wasm::kExprI8x16GeU: | 3609 case wasm::kExprI8x16GeU: |
3610 return graph()->NewNode( | 3610 return graph()->NewNode( |
3611 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[0], | 3611 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[0], |
3612 inputs[1]); | 3612 inputs[1]); |
| 3613 case wasm::kExprS128And: |
| 3614 return graph()->NewNode(jsgraph()->machine()->Simd128And(), inputs[0], |
| 3615 inputs[1]); |
| 3616 case wasm::kExprS128Or: |
| 3617 return graph()->NewNode(jsgraph()->machine()->Simd128Or(), inputs[0], |
| 3618 inputs[1]); |
| 3619 case wasm::kExprS128Xor: |
| 3620 return graph()->NewNode(jsgraph()->machine()->Simd128Xor(), inputs[0], |
| 3621 inputs[1]); |
| 3622 case wasm::kExprS128Not: |
| 3623 return graph()->NewNode(jsgraph()->machine()->Simd128Not(), inputs[0]); |
3613 case wasm::kExprS32x4Select: | 3624 case wasm::kExprS32x4Select: |
3614 return graph()->NewNode(jsgraph()->machine()->Simd32x4Select(), inputs[0], | 3625 return graph()->NewNode(jsgraph()->machine()->Simd32x4Select(), inputs[0], |
3615 inputs[1], inputs[2]); | 3626 inputs[1], inputs[2]); |
3616 case wasm::kExprS16x8Select: | 3627 case wasm::kExprS16x8Select: |
3617 return graph()->NewNode(jsgraph()->machine()->Simd16x8Select(), inputs[0], | 3628 return graph()->NewNode(jsgraph()->machine()->Simd16x8Select(), inputs[0], |
3618 inputs[1], inputs[2]); | 3629 inputs[1], inputs[2]); |
3619 case wasm::kExprS8x16Select: | 3630 case wasm::kExprS8x16Select: |
3620 return graph()->NewNode(jsgraph()->machine()->Simd8x16Select(), inputs[0], | 3631 return graph()->NewNode(jsgraph()->machine()->Simd8x16Select(), inputs[0], |
3621 inputs[1], inputs[2]); | 3632 inputs[1], inputs[2]); |
3622 case wasm::kExprS128And: | 3633 case wasm::kExprS1x4And: |
3623 return graph()->NewNode(jsgraph()->machine()->Simd128And(), inputs[0], | 3634 return graph()->NewNode(jsgraph()->machine()->Simd1x4And(), inputs[0], |
3624 inputs[1]); | 3635 inputs[1]); |
3625 case wasm::kExprS128Or: | 3636 case wasm::kExprS1x4Or: |
3626 return graph()->NewNode(jsgraph()->machine()->Simd128Or(), inputs[0], | 3637 return graph()->NewNode(jsgraph()->machine()->Simd1x4Or(), inputs[0], |
3627 inputs[1]); | 3638 inputs[1]); |
3628 case wasm::kExprS128Xor: | 3639 case wasm::kExprS1x4Xor: |
3629 return graph()->NewNode(jsgraph()->machine()->Simd128Xor(), inputs[0], | 3640 return graph()->NewNode(jsgraph()->machine()->Simd1x4Xor(), inputs[0], |
3630 inputs[1]); | 3641 inputs[1]); |
3631 case wasm::kExprS128Not: | 3642 case wasm::kExprS1x4Not: |
3632 return graph()->NewNode(jsgraph()->machine()->Simd128Not(), inputs[0]); | 3643 return graph()->NewNode(jsgraph()->machine()->Simd1x4Not(), inputs[0]); |
| 3644 case wasm::kExprS1x4AnyTrue: |
| 3645 return graph()->NewNode(jsgraph()->machine()->Simd1x4AnyTrue(), |
| 3646 inputs[0]); |
| 3647 case wasm::kExprS1x4AllTrue: |
| 3648 return graph()->NewNode(jsgraph()->machine()->Simd1x4AllTrue(), |
| 3649 inputs[0]); |
| 3650 case wasm::kExprS1x8And: |
| 3651 return graph()->NewNode(jsgraph()->machine()->Simd1x8And(), inputs[0], |
| 3652 inputs[1]); |
| 3653 case wasm::kExprS1x8Or: |
| 3654 return graph()->NewNode(jsgraph()->machine()->Simd1x8Or(), inputs[0], |
| 3655 inputs[1]); |
| 3656 case wasm::kExprS1x8Xor: |
| 3657 return graph()->NewNode(jsgraph()->machine()->Simd1x8Xor(), inputs[0], |
| 3658 inputs[1]); |
| 3659 case wasm::kExprS1x8Not: |
| 3660 return graph()->NewNode(jsgraph()->machine()->Simd1x8Not(), inputs[0]); |
| 3661 case wasm::kExprS1x8AnyTrue: |
| 3662 return graph()->NewNode(jsgraph()->machine()->Simd1x8AnyTrue(), |
| 3663 inputs[0]); |
| 3664 case wasm::kExprS1x8AllTrue: |
| 3665 return graph()->NewNode(jsgraph()->machine()->Simd1x8AllTrue(), |
| 3666 inputs[0]); |
| 3667 case wasm::kExprS1x16And: |
| 3668 return graph()->NewNode(jsgraph()->machine()->Simd1x16And(), inputs[0], |
| 3669 inputs[1]); |
| 3670 case wasm::kExprS1x16Or: |
| 3671 return graph()->NewNode(jsgraph()->machine()->Simd1x16Or(), inputs[0], |
| 3672 inputs[1]); |
| 3673 case wasm::kExprS1x16Xor: |
| 3674 return graph()->NewNode(jsgraph()->machine()->Simd1x16Xor(), inputs[0], |
| 3675 inputs[1]); |
| 3676 case wasm::kExprS1x16Not: |
| 3677 return graph()->NewNode(jsgraph()->machine()->Simd1x16Not(), inputs[0]); |
| 3678 case wasm::kExprS1x16AnyTrue: |
| 3679 return graph()->NewNode(jsgraph()->machine()->Simd1x16AnyTrue(), |
| 3680 inputs[0]); |
| 3681 case wasm::kExprS1x16AllTrue: |
| 3682 return graph()->NewNode(jsgraph()->machine()->Simd1x16AllTrue(), |
| 3683 inputs[0]); |
3633 default: | 3684 default: |
3634 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr); | 3685 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr); |
3635 } | 3686 } |
3636 } | 3687 } |
3637 | 3688 |
3638 Node* WasmGraphBuilder::SimdLaneOp(wasm::WasmOpcode opcode, uint8_t lane, | 3689 Node* WasmGraphBuilder::SimdLaneOp(wasm::WasmOpcode opcode, uint8_t lane, |
3639 const NodeVector& inputs) { | 3690 const NodeVector& inputs) { |
3640 has_simd_ = true; | 3691 has_simd_ = true; |
3641 switch (opcode) { | 3692 switch (opcode) { |
3642 case wasm::kExprF32x4ExtractLane: | 3693 case wasm::kExprF32x4ExtractLane: |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4165 function_->code_end_offset - function_->code_start_offset, | 4216 function_->code_end_offset - function_->code_start_offset, |
4166 codegen_ms); | 4217 codegen_ms); |
4167 } | 4218 } |
4168 | 4219 |
4169 return code; | 4220 return code; |
4170 } | 4221 } |
4171 | 4222 |
4172 } // namespace compiler | 4223 } // namespace compiler |
4173 } // namespace internal | 4224 } // namespace internal |
4174 } // namespace v8 | 4225 } // namespace v8 |
OLD | NEW |