| Index: src/compiler/s390/instruction-selector-s390.cc
|
| diff --git a/src/compiler/s390/instruction-selector-s390.cc b/src/compiler/s390/instruction-selector-s390.cc
|
| index 150e2bd7d4cc21819002f64613c21a047e044261..6fdd7ec87fd56695c7c7eefd3c5cfd4f13a4514a 100644
|
| --- a/src/compiler/s390/instruction-selector-s390.cc
|
| +++ b/src/compiler/s390/instruction-selector-s390.cc
|
| @@ -1768,6 +1768,37 @@ void InstructionSelector::VisitAtomicLoad(Node* node) {
|
| g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index));
|
| }
|
|
|
| +void InstructionSelector::VisitAtomicStore(Node* node) {
|
| + MachineRepresentation rep = AtomicStoreRepresentationOf(node->op());
|
| + S390OperandGenerator 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;
|
| + }
|
| +
|
| + InstructionOperand inputs[4];
|
| + size_t input_count = 0;
|
| + inputs[input_count++] = g.UseUniqueRegister(value);
|
| + inputs[input_count++] = g.UseUniqueRegister(base);
|
| + inputs[input_count++] = g.UseUniqueRegister(index);
|
| + Emit(opcode | AddressingModeField::encode(kMode_MRR), 0, nullptr, input_count,
|
| + inputs);
|
| +}
|
| +
|
| // static
|
| MachineOperatorBuilder::Flags
|
| InstructionSelector::SupportedMachineOperatorFlags() {
|
|
|