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

Unified Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 2500443004: [wasm] OOB traps: build protected instruction list during codegen (Closed)
Patch Set: Removing spurious changes Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
index bcf5fbfd99bd651cc8ae524b2c273fc866a3a318..8079e2fe2d520e6e4a0a06e2bf1d909f2ea3ecb2 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -179,8 +179,7 @@ class X64OperandGenerator final : public OperandGenerator {
};
namespace {
-
-ArchOpcode GetLoadOpcode(LoadRepresentation load_rep) {
+ArchOpcode GetLoadOpcode(LoadRepresentation load_rep, bool protect) {
ArchOpcode opcode = kArchNop;
switch (load_rep.representation()) {
case MachineRepresentation::kFloat32:
@@ -252,7 +251,8 @@ void InstructionSelector::VisitLoad(Node* node) {
LoadRepresentation load_rep = LoadRepresentationOf(node->op());
X64OperandGenerator g(this);
- ArchOpcode opcode = GetLoadOpcode(load_rep);
+ const bool protect = false;
+ ArchOpcode opcode = GetLoadOpcode(load_rep, protect);
InstructionOperand outputs[1];
outputs[0] = g.DefineAsRegister(node);
InstructionOperand inputs[3];
@@ -267,7 +267,8 @@ void InstructionSelector::VisitProtectedLoad(Node* node) {
LoadRepresentation load_rep = LoadRepresentationOf(node->op());
X64OperandGenerator g(this);
- ArchOpcode opcode = GetLoadOpcode(load_rep);
+ const bool protect = true;
+ ArchOpcode opcode = GetLoadOpcode(load_rep, protect);
InstructionOperand outputs[1];
outputs[0] = g.DefineAsRegister(node);
InstructionOperand inputs[4];
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698