| 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/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 | 10 |
| (...skipping 3059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3070 Int32Constant(value), Int32Constant(value), | 3070 Int32Constant(value), Int32Constant(value), |
| 3071 Int32Constant(value), Int32Constant(value)); | 3071 Int32Constant(value), Int32Constant(value)); |
| 3072 } | 3072 } |
| 3073 | 3073 |
| 3074 Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode, | 3074 Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode, |
| 3075 const NodeVector& inputs) { | 3075 const NodeVector& inputs) { |
| 3076 switch (opcode) { | 3076 switch (opcode) { |
| 3077 case wasm::kExprI32x4Splat: | 3077 case wasm::kExprI32x4Splat: |
| 3078 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), inputs[0], | 3078 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), inputs[0], |
| 3079 inputs[0], inputs[0], inputs[0]); | 3079 inputs[0], inputs[0], inputs[0]); |
| 3080 case wasm::kExprI32x4ExtractLane: |
| 3081 return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(), |
| 3082 inputs[0], inputs[1]); |
| 3083 case wasm::kExprI32x4ReplaceLane: |
| 3084 return graph()->NewNode(jsgraph()->machine()->Int32x4ReplaceLane(), |
| 3085 inputs[0], inputs[1], inputs[2]); |
| 3080 case wasm::kExprI32x4Add: | 3086 case wasm::kExprI32x4Add: |
| 3081 return graph()->NewNode(jsgraph()->machine()->Int32x4Add(), inputs[0], | 3087 return graph()->NewNode(jsgraph()->machine()->Int32x4Add(), inputs[0], |
| 3082 inputs[1]); | 3088 inputs[1]); |
| 3089 case wasm::kExprI32x4Sub: |
| 3090 return graph()->NewNode(jsgraph()->machine()->Int32x4Sub(), inputs[0], |
| 3091 inputs[1]); |
| 3083 case wasm::kExprF32x4ExtractLane: | 3092 case wasm::kExprF32x4ExtractLane: |
| 3084 return graph()->NewNode(jsgraph()->machine()->Float32x4ExtractLane(), | 3093 return graph()->NewNode(jsgraph()->machine()->Float32x4ExtractLane(), |
| 3085 inputs[0], inputs[1]); | 3094 inputs[0], inputs[1]); |
| 3086 case wasm::kExprF32x4Splat: | 3095 case wasm::kExprF32x4Splat: |
| 3087 return graph()->NewNode(jsgraph()->machine()->CreateFloat32x4(), | 3096 return graph()->NewNode(jsgraph()->machine()->CreateFloat32x4(), |
| 3088 inputs[0], inputs[0], inputs[0], inputs[0]); | 3097 inputs[0], inputs[0], inputs[0], inputs[0]); |
| 3089 case wasm::kExprF32x4Add: | 3098 case wasm::kExprF32x4Add: |
| 3090 return graph()->NewNode(jsgraph()->machine()->Float32x4Add(), inputs[0], | 3099 return graph()->NewNode(jsgraph()->machine()->Float32x4Add(), inputs[0], |
| 3091 inputs[1]); | 3100 inputs[1]); |
| 3092 default: | 3101 default: |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3459 function_->code_start_offset), | 3468 function_->code_start_offset), |
| 3460 compile_ms); | 3469 compile_ms); |
| 3461 } | 3470 } |
| 3462 | 3471 |
| 3463 return code; | 3472 return code; |
| 3464 } | 3473 } |
| 3465 | 3474 |
| 3466 } // namespace compiler | 3475 } // namespace compiler |
| 3467 } // namespace internal | 3476 } // namespace internal |
| 3468 } // namespace v8 | 3477 } // namespace v8 |
| OLD | NEW |