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

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 2711863002: Implement remaining Boolean SIMD operations on ARM. (Closed)
Patch Set: Martyn's review changes. Created 3 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
OLDNEW
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 3581 matching lines...) Expand 10 before | Expand all | Expand 10 after
3592 return graph()->NewNode( 3592 return graph()->NewNode(
3593 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[1], 3593 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[1],
3594 inputs[0]); 3594 inputs[0]);
3595 case wasm::kExprI8x16GtU: 3595 case wasm::kExprI8x16GtU:
3596 return graph()->NewNode(jsgraph()->machine()->Uint8x16GreaterThan(), 3596 return graph()->NewNode(jsgraph()->machine()->Uint8x16GreaterThan(),
3597 inputs[0], inputs[1]); 3597 inputs[0], inputs[1]);
3598 case wasm::kExprI8x16GeU: 3598 case wasm::kExprI8x16GeU:
3599 return graph()->NewNode( 3599 return graph()->NewNode(
3600 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[0], 3600 jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[0],
3601 inputs[1]); 3601 inputs[1]);
3602 case wasm::kExprS128And:
3603 return graph()->NewNode(jsgraph()->machine()->Simd128And(), inputs[0],
3604 inputs[1]);
3605 case wasm::kExprS128Or:
3606 return graph()->NewNode(jsgraph()->machine()->Simd128Or(), inputs[0],
3607 inputs[1]);
3608 case wasm::kExprS128Xor:
3609 return graph()->NewNode(jsgraph()->machine()->Simd128Xor(), inputs[0],
3610 inputs[1]);
3611 case wasm::kExprS128Not:
3612 return graph()->NewNode(jsgraph()->machine()->Simd128Not(), inputs[0]);
3602 case wasm::kExprS32x4Select: 3613 case wasm::kExprS32x4Select:
3603 return graph()->NewNode(jsgraph()->machine()->Simd32x4Select(), inputs[0], 3614 return graph()->NewNode(jsgraph()->machine()->Simd32x4Select(), inputs[0],
3604 inputs[1], inputs[2]); 3615 inputs[1], inputs[2]);
3605 case wasm::kExprS16x8Select: 3616 case wasm::kExprS16x8Select:
3606 return graph()->NewNode(jsgraph()->machine()->Simd16x8Select(), inputs[0], 3617 return graph()->NewNode(jsgraph()->machine()->Simd16x8Select(), inputs[0],
3607 inputs[1], inputs[2]); 3618 inputs[1], inputs[2]);
3608 case wasm::kExprS8x16Select: 3619 case wasm::kExprS8x16Select:
3609 return graph()->NewNode(jsgraph()->machine()->Simd8x16Select(), inputs[0], 3620 return graph()->NewNode(jsgraph()->machine()->Simd8x16Select(), inputs[0],
3610 inputs[1], inputs[2]); 3621 inputs[1], inputs[2]);
3611 case wasm::kExprS128And: 3622 case wasm::kExprS1x4And:
3612 return graph()->NewNode(jsgraph()->machine()->Simd128And(), inputs[0], 3623 return graph()->NewNode(jsgraph()->machine()->Simd1x4And(), inputs[0],
3613 inputs[1]); 3624 inputs[1]);
3614 case wasm::kExprS128Or: 3625 case wasm::kExprS1x4Or:
3615 return graph()->NewNode(jsgraph()->machine()->Simd128Or(), inputs[0], 3626 return graph()->NewNode(jsgraph()->machine()->Simd1x4Or(), inputs[0],
3616 inputs[1]); 3627 inputs[1]);
3617 case wasm::kExprS128Xor: 3628 case wasm::kExprS1x4Xor:
3618 return graph()->NewNode(jsgraph()->machine()->Simd128Xor(), inputs[0], 3629 return graph()->NewNode(jsgraph()->machine()->Simd1x4Xor(), inputs[0],
3619 inputs[1]); 3630 inputs[1]);
3620 case wasm::kExprS128Not: 3631 case wasm::kExprS1x4Not:
3621 return graph()->NewNode(jsgraph()->machine()->Simd128Not(), inputs[0]); 3632 return graph()->NewNode(jsgraph()->machine()->Simd1x4Not(), inputs[0]);
3633 case wasm::kExprS1x4AnyTrue:
3634 return graph()->NewNode(jsgraph()->machine()->Simd1x4AnyTrue(),
3635 inputs[0]);
3636 case wasm::kExprS1x4AllTrue:
3637 return graph()->NewNode(jsgraph()->machine()->Simd1x4AllTrue(),
3638 inputs[0]);
3639 case wasm::kExprS1x8And:
3640 return graph()->NewNode(jsgraph()->machine()->Simd1x8And(), inputs[0],
3641 inputs[1]);
3642 case wasm::kExprS1x8Or:
3643 return graph()->NewNode(jsgraph()->machine()->Simd1x8Or(), inputs[0],
3644 inputs[1]);
3645 case wasm::kExprS1x8Xor:
3646 return graph()->NewNode(jsgraph()->machine()->Simd1x8Xor(), inputs[0],
3647 inputs[1]);
3648 case wasm::kExprS1x8Not:
3649 return graph()->NewNode(jsgraph()->machine()->Simd1x8Not(), inputs[0]);
3650 case wasm::kExprS1x8AnyTrue:
3651 return graph()->NewNode(jsgraph()->machine()->Simd1x8AnyTrue(),
3652 inputs[0]);
3653 case wasm::kExprS1x8AllTrue:
3654 return graph()->NewNode(jsgraph()->machine()->Simd1x8AllTrue(),
3655 inputs[0]);
3656 case wasm::kExprS1x16And:
3657 return graph()->NewNode(jsgraph()->machine()->Simd1x16And(), inputs[0],
3658 inputs[1]);
3659 case wasm::kExprS1x16Or:
3660 return graph()->NewNode(jsgraph()->machine()->Simd1x16Or(), inputs[0],
3661 inputs[1]);
3662 case wasm::kExprS1x16Xor:
3663 return graph()->NewNode(jsgraph()->machine()->Simd1x16Xor(), inputs[0],
3664 inputs[1]);
3665 case wasm::kExprS1x16Not:
3666 return graph()->NewNode(jsgraph()->machine()->Simd1x16Not(), inputs[0]);
3667 case wasm::kExprS1x16AnyTrue:
3668 return graph()->NewNode(jsgraph()->machine()->Simd1x16AnyTrue(),
3669 inputs[0]);
3670 case wasm::kExprS1x16AllTrue:
3671 return graph()->NewNode(jsgraph()->machine()->Simd1x16AllTrue(),
3672 inputs[0]);
3622 default: 3673 default:
3623 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr); 3674 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
3624 } 3675 }
3625 } 3676 }
3626 3677
3627 Node* WasmGraphBuilder::SimdLaneOp(wasm::WasmOpcode opcode, uint8_t lane, 3678 Node* WasmGraphBuilder::SimdLaneOp(wasm::WasmOpcode opcode, uint8_t lane,
3628 const NodeVector& inputs) { 3679 const NodeVector& inputs) {
3629 has_simd_ = true; 3680 has_simd_ = true;
3630 switch (opcode) { 3681 switch (opcode) {
3631 case wasm::kExprF32x4ExtractLane: 3682 case wasm::kExprF32x4ExtractLane:
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
4151 function_->code_end_offset - function_->code_start_offset, 4202 function_->code_end_offset - function_->code_start_offset,
4152 codegen_ms); 4203 codegen_ms);
4153 } 4204 }
4154 4205
4155 return code; 4206 return code;
4156 } 4207 }
4157 4208
4158 } // namespace compiler 4209 } // namespace compiler
4159 } // namespace internal 4210 } // namespace internal
4160 } // namespace v8 4211 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698