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

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

Issue 2628433004: [wasm] TrapIf and TrapUnless TurboFan operators implemented on mips. (Closed)
Patch Set: rebase Created 3 years, 11 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
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 } else { 183 } else {
184 // We use Runtime::kNumFunctions as a marker to tell the code generator 184 // We use Runtime::kNumFunctions as a marker to tell the code generator
185 // to generate a call to a testing c-function instead of a runtime 185 // to generate a call to a testing c-function instead of a runtime
186 // function. This code should only be called from a cctest. 186 // function. This code should only be called from a cctest.
187 return Runtime::kNumFunctions; 187 return Runtime::kNumFunctions;
188 } 188 }
189 } 189 }
190 190
191 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || \ 191 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || \
192 V8_TARGET_ARCH_ARM64 192 V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS
193 #define WASM_TRAP_IF_SUPPORTED 193 #define WASM_TRAP_IF_SUPPORTED
194 #endif 194 #endif
195 195
196 // Add a trap if {cond} is true. 196 // Add a trap if {cond} is true.
197 void AddTrapIfTrue(wasm::TrapReason reason, Node* cond, 197 void AddTrapIfTrue(wasm::TrapReason reason, Node* cond,
198 wasm::WasmCodePosition position) { 198 wasm::WasmCodePosition position) {
199 #ifdef WASM_TRAP_IF_SUPPORTED 199 #ifdef WASM_TRAP_IF_SUPPORTED
200 if (FLAG_wasm_trap_if) { 200 if (FLAG_wasm_trap_if) {
201 int32_t trap_id = GetFunctionIdForTrap(reason); 201 int32_t trap_id = GetFunctionIdForTrap(reason);
202 Node* node = graph()->NewNode(common()->TrapIf(trap_id), cond, 202 Node* node = graph()->NewNode(common()->TrapIf(trap_id), cond,
(...skipping 3490 matching lines...) Expand 10 before | Expand all | Expand 10 after
3693 Smi::FromInt(instruction.instr_offset)); 3693 Smi::FromInt(instruction.instr_offset));
3694 fn_protected->set(Code::kTrapDataSize * i + Code::kTrapLandingOffset, 3694 fn_protected->set(Code::kTrapDataSize * i + Code::kTrapLandingOffset,
3695 Smi::FromInt(instruction.landing_offset)); 3695 Smi::FromInt(instruction.landing_offset));
3696 } 3696 }
3697 return fn_protected; 3697 return fn_protected;
3698 } 3698 }
3699 3699
3700 } // namespace compiler 3700 } // namespace compiler
3701 } // namespace internal 3701 } // namespace internal
3702 } // namespace v8 3702 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698