Index: src/compiler/ppc/instruction-selector-ppc.cc |
diff --git a/src/compiler/ppc/instruction-selector-ppc.cc b/src/compiler/ppc/instruction-selector-ppc.cc |
index 5abb5f14762b89615444513f1438f539a64cebbc..3bfc087196ad21b0031bfc8af0ec4c46b96bf290 100644 |
--- a/src/compiler/ppc/instruction-selector-ppc.cc |
+++ b/src/compiler/ppc/instruction-selector-ppc.cc |
@@ -1921,6 +1921,29 @@ void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { |
g.UseRegister(left), g.UseRegister(right)); |
} |
+void InstructionSelector::VisitAtomicLoad(Node* node) { |
+ LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
+ PPCOperandGenerator 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_MRR), |
+ g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index)); |
+} |
// static |
MachineOperatorBuilder::Flags |