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 3555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3566 return graph()->NewNode(jsgraph()->machine()->I8x16ShrS(shift), | 3566 return graph()->NewNode(jsgraph()->machine()->I8x16ShrS(shift), |
3567 inputs[0]); | 3567 inputs[0]); |
3568 case wasm::kExprI8x16ShrU: | 3568 case wasm::kExprI8x16ShrU: |
3569 return graph()->NewNode(jsgraph()->machine()->I8x16ShrU(shift), | 3569 return graph()->NewNode(jsgraph()->machine()->I8x16ShrU(shift), |
3570 inputs[0]); | 3570 inputs[0]); |
3571 default: | 3571 default: |
3572 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr); | 3572 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr); |
3573 } | 3573 } |
3574 } | 3574 } |
3575 | 3575 |
3576 Node* WasmGraphBuilder::SimdShuffleOp(uint8_t shuffle[16], unsigned lanes, | 3576 Node* WasmGraphBuilder::Simd8x16ShuffleOp(uint8_t shuffle[16], |
3577 const NodeVector& inputs) { | 3577 const NodeVector& inputs) { |
3578 has_simd_ = true; | 3578 has_simd_ = true; |
3579 switch (lanes) { | 3579 return graph()->NewNode(jsgraph()->machine()->S8x16Shuffle(shuffle), |
3580 case 4: | 3580 inputs[0], inputs[1]); |
3581 return graph()->NewNode(jsgraph()->machine()->S32x4Shuffle(shuffle), | |
3582 inputs[0], inputs[1]); | |
3583 case 8: | |
3584 return graph()->NewNode(jsgraph()->machine()->S16x8Shuffle(shuffle), | |
3585 inputs[0], inputs[1]); | |
3586 case 16: | |
3587 return graph()->NewNode(jsgraph()->machine()->S8x16Shuffle(shuffle), | |
3588 inputs[0], inputs[1]); | |
3589 default: | |
3590 UNREACHABLE(); | |
3591 } | |
3592 } | 3581 } |
3593 | 3582 |
3594 static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag, | 3583 static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag, |
3595 Isolate* isolate, Handle<Code> code, | 3584 Isolate* isolate, Handle<Code> code, |
3596 const char* message, uint32_t index, | 3585 const char* message, uint32_t index, |
3597 const wasm::WasmName& module_name, | 3586 const wasm::WasmName& module_name, |
3598 const wasm::WasmName& func_name) { | 3587 const wasm::WasmName& func_name) { |
3599 DCHECK(isolate->logger()->is_logging_code_events() || | 3588 DCHECK(isolate->logger()->is_logging_code_events() || |
3600 isolate->is_profiling()); | 3589 isolate->is_profiling()); |
3601 | 3590 |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4075 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { | 4064 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { |
4076 WasmCompilationUnit unit(isolate, module_env, function); | 4065 WasmCompilationUnit unit(isolate, module_env, function); |
4077 unit.InitializeHandles(); | 4066 unit.InitializeHandles(); |
4078 unit.ExecuteCompilation(); | 4067 unit.ExecuteCompilation(); |
4079 return unit.FinishCompilation(thrower); | 4068 return unit.FinishCompilation(thrower); |
4080 } | 4069 } |
4081 | 4070 |
4082 } // namespace compiler | 4071 } // namespace compiler |
4083 } // namespace internal | 4072 } // namespace internal |
4084 } // namespace v8 | 4073 } // namespace v8 |
OLD | NEW |