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

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

Issue 2264533002: [wasm] Add native x64 implementations for I32x4Splat, I32x4ExtractLane (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@macroize_runtime
Patch Set: cctest Created 4 years, 4 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/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 10
(...skipping 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2897 } 2897 }
2898 2898
2899 void WasmGraphBuilder::SetSourcePosition(Node* node, 2899 void WasmGraphBuilder::SetSourcePosition(Node* node,
2900 wasm::WasmCodePosition position) { 2900 wasm::WasmCodePosition position) {
2901 DCHECK_NE(position, wasm::kNoCodePosition); 2901 DCHECK_NE(position, wasm::kNoCodePosition);
2902 compiler::SourcePosition pos(position); 2902 compiler::SourcePosition pos(position);
2903 if (source_position_table_) 2903 if (source_position_table_)
2904 source_position_table_->SetSourcePosition(node, pos); 2904 source_position_table_->SetSourcePosition(node, pos);
2905 } 2905 }
2906 2906
2907 Node* WasmGraphBuilder::DefaultS128Value() {
2908 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(),
2909 Int32Constant(0), Int32Constant(0), Int32Constant(0),
2910 Int32Constant(0));
2911 }
2912
2907 Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode, 2913 Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
2908 const NodeVector& inputs) { 2914 const NodeVector& inputs) {
2909 switch (opcode) { 2915 switch (opcode) {
2910 case wasm::kExprI32x4ExtractLane: 2916 case wasm::kExprI32x4ExtractLane:
2911 return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(), 2917 return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(),
2912 inputs[0], inputs[1]); 2918 inputs[0], inputs[1]);
2913 case wasm::kExprI32x4Splat: 2919 case wasm::kExprI32x4Splat:
2914 return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(), 2920 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), inputs[0],
2915 inputs[0], inputs[0], inputs[0], inputs[0]); 2921 inputs[0], inputs[0], inputs[0]);
2916 default: 2922 default:
2917 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr); 2923 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
2918 } 2924 }
2919 } 2925 }
2920 2926
2921 static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag, 2927 static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag,
2922 Isolate* isolate, Handle<Code> code, 2928 Isolate* isolate, Handle<Code> code,
2923 const char* message, uint32_t index, 2929 const char* message, uint32_t index,
2924 const wasm::WasmName& module_name, 2930 const wasm::WasmName& module_name,
2925 const wasm::WasmName& func_name) { 2931 const wasm::WasmName& func_name) {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 function_->code_start_offset), 3276 function_->code_start_offset),
3271 compile_ms); 3277 compile_ms);
3272 } 3278 }
3273 3279
3274 return code; 3280 return code;
3275 } 3281 }
3276 3282
3277 } // namespace compiler 3283 } // namespace compiler
3278 } // namespace internal 3284 } // namespace internal
3279 } // namespace v8 3285 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698