Chromium Code Reviews| Index: src/compiler/arm64/code-generator-arm64.cc |
| diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc |
| index 57e1e4661269218eb32f12356b93268e98e1359a..6c074812e6f6e25a4c50cca3f89fba881a8bf008 100644 |
| --- a/src/compiler/arm64/code-generator-arm64.cc |
| +++ b/src/compiler/arm64/code-generator-arm64.cc |
| @@ -472,6 +472,13 @@ Condition FlagsConditionToCondition(FlagsCondition condition) { |
| } \ |
| } while (0) |
| +#define ASSEMBLE_ATOMIC_LOAD_INTEGER(asm_instr) \ |
| + do { \ |
| + __ asm_instr(i.OutputRegister(), \ |
| + MemOperand(i.InputRegister(0), i.InputRegister(1))); \ |
| + __ Dmb(InnerShareable, BarrierAll); \ |
| + } while (0) |
| + |
| void CodeGenerator::AssembleDeconstructFrame() { |
| const CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| if (descriptor->IsCFunctionCall() || descriptor->UseNativeStack()) { |
| @@ -1404,6 +1411,21 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
| case kCheckedStoreFloat64: |
| ASSEMBLE_CHECKED_STORE_FLOAT(64); |
| 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); |
|
Rodolph Perfetta
2016/04/15 14:36:03
For Ldrb/sb/h/sh the amount of data loaded is give
binji
2016/04/15 21:00:13
Oops, right. Done
|
| + break; |
| } |
| } // NOLINT(readability/fn_size) |