Index: src/compiler/arm/instruction-selector-arm.cc |
diff --git a/src/compiler/arm/instruction-selector-arm.cc b/src/compiler/arm/instruction-selector-arm.cc |
index b8d2d905e45681b9933250f3a27e78e35593f82c..9b593a771935c7a84757b03eec04ee7f48f841b3 100644 |
--- a/src/compiler/arm/instruction-selector-arm.cc |
+++ b/src/compiler/arm/instruction-selector-arm.cc |
@@ -1835,6 +1835,38 @@ void InstructionSelector::VisitAtomicLoad(Node* node) { |
g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index)); |
} |
+void InstructionSelector::VisitAtomicStore(Node* node) { |
+ MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); |
+ ArmOperandGenerator g(this); |
+ Node* base = node->InputAt(0); |
+ Node* index = node->InputAt(1); |
+ Node* value = node->InputAt(2); |
+ ArchOpcode opcode = kArchNop; |
+ switch (rep) { |
+ case MachineRepresentation::kWord8: |
+ opcode = kAtomicStoreWord8; |
+ break; |
+ case MachineRepresentation::kWord16: |
+ opcode = kAtomicStoreWord16; |
+ break; |
+ case MachineRepresentation::kWord32: |
+ opcode = kAtomicStoreWord32; |
+ break; |
+ default: |
+ UNREACHABLE(); |
+ return; |
+ } |
+ |
+ AddressingMode addressing_mode = kMode_Offset_RR; |
+ InstructionOperand inputs[4]; |
+ size_t input_count = 0; |
+ inputs[input_count++] = g.UseUniqueRegister(base); |
+ inputs[input_count++] = g.UseUniqueRegister(index); |
+ inputs[input_count++] = g.UseUniqueRegister(value); |
+ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); |
+ Emit(code, 0, nullptr, input_count, inputs); |
+} |
+ |
// static |
MachineOperatorBuilder::Flags |
InstructionSelector::SupportedMachineOperatorFlags() { |