Index: src/compiler/mips64/instruction-selector-mips64.cc |
diff --git a/src/compiler/mips64/instruction-selector-mips64.cc b/src/compiler/mips64/instruction-selector-mips64.cc |
index 6680a49ff91f15a2e42e9ca4bf440fe806501e07..13dda0fff423bdaa9e20c16fd0210cbefc3f7558 100644 |
--- a/src/compiler/mips64/instruction-selector-mips64.cc |
+++ b/src/compiler/mips64/instruction-selector-mips64.cc |
@@ -1963,6 +1963,29 @@ void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { |
g.UseRegister(left), g.UseRegister(right)); |
} |
+void InstructionSelector::VisitAtomicLoad(Node* node) { |
+ LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
+ Mips64OperandGenerator g(this); |
+ Node* base = node->InputAt(0); |
+ Node* index = node->InputAt(1); |
+ ArchOpcode opcode = kArchNop; |
+ switch (load_rep.representation()) { |
+ case MachineRepresentation::kWord8: |
+ opcode = load_rep.IsSigned() ? kAtomicLoadInt8 : kAtomicLoadUint8; |
+ break; |
+ case MachineRepresentation::kWord16: |
+ opcode = load_rep.IsSigned() ? kAtomicLoadInt16 : kAtomicLoadUint16; |
+ break; |
+ case MachineRepresentation::kWord32: |
+ opcode = kAtomicLoadWord32; |
+ break; |
+ default: |
+ UNREACHABLE(); |
+ return; |
+ } |
+ Emit(opcode | AddressingModeField::encode(kMode_MRI), |
+ g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index)); |
+} |
// static |
MachineOperatorBuilder::Flags |