| 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 f597424a2b5805fa068a58a36fbadbd7da8f2e22..15f7dea8b53dafb9ba323bd0de45f42369b491e3 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:
|
| @@ -197,7 +196,7 @@ ArchOpcode GetLoadOpcode(LoadRepresentation load_rep) {
|
| opcode = load_rep.IsSigned() ? kX64Movsxwl : kX64Movzxwl;
|
| break;
|
| case MachineRepresentation::kWord32:
|
| - opcode = kX64Movl;
|
| + opcode = protect ? kX64TrapMovl : kX64Movl;
|
| break;
|
| case MachineRepresentation::kTaggedSigned: // Fall through.
|
| case MachineRepresentation::kTaggedPointer: // Fall through.
|
| @@ -219,7 +218,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];
|
| @@ -234,7 +234,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];
|
|
|