Index: src/compiler/arm/code-generator-arm.cc |
diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc |
index ecbee760b9ee8470c0a85fd3d5290268c2d6b6a1..9ac862c6175104054676e95fc1075b053a745065 100644 |
--- a/src/compiler/arm/code-generator-arm.cc |
+++ b/src/compiler/arm/code-generator-arm.cc |
@@ -388,6 +388,13 @@ Condition FlagsConditionToCondition(FlagsCondition condition) { |
DCHECK_EQ(LeaveCC, i.OutputSBit()); \ |
} while (0) |
+#define ASSEMBLE_ATOMIC_LOAD_INTEGER(asm_instr) \ |
+ do { \ |
+ __ asm_instr(i.OutputRegister(), \ |
+ MemOperand(i.InputRegister(0), i.InputRegister(1))); \ |
+ __ dmb(ISH); \ |
+ } while (0) |
+ |
void CodeGenerator::AssembleDeconstructFrame() { |
__ LeaveFrame(StackFrame::MANUAL); |
} |
@@ -1250,6 +1257,22 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
case kCheckedStoreWord64: |
UNREACHABLE(); // currently unsupported checked int64 load/store. |
break; |
+ |
+ case kAtomicLoadInt8: |
+ ASSEMBLE_ATOMIC_LOAD_INTEGER(ldrsb); |
+ break; |
+ case kAtomicLoadUint8: |
+ ASSEMBLE_ATOMIC_LOAD_INTEGER(ldrb); |
+ break; |
+ case kAtomicLoadInt16: |
+ ASSEMBLE_ATOMIC_LOAD_INTEGER(ldrsh); |
+ break; |
+ case kAtomicLoadUint16: |
+ ASSEMBLE_ATOMIC_LOAD_INTEGER(ldrh); |
+ break; |
+ case kAtomicLoadWord32: |
+ ASSEMBLE_ATOMIC_LOAD_INTEGER(ldr); |
+ break; |
} |
} // NOLINT(readability/fn_size) |