Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index d6581f747570015c63a0366b6bff412296d7ead9..a8c18a0bf8886749ae9be1c5da225f5a098502f8 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -478,6 +478,13 @@ FPUCondition FlagsConditionToConditionCmpFPU(bool& predicate, |
__ sync(); \ |
} while (0) |
+#define ASSEMBLE_ATOMIC_STORE_INTEGER(asm_instr) \ |
+ do { \ |
+ __ sync(); \ |
+ __ asm_instr(i.InputRegister(2), i.MemoryOperand()); \ |
+ __ sync(); \ |
+ } while (0) |
+ |
void CodeGenerator::AssembleDeconstructFrame() { |
__ mov(sp, fp); |
__ Pop(ra, fp); |
@@ -1347,10 +1354,13 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
ASSEMBLE_ATOMIC_LOAD_INTEGER(lw); |
break; |
case kAtomicStoreWord8: |
+ ASSEMBLE_ATOMIC_STORE_INTEGER(sb); |
+ break; |
case kAtomicStoreWord16: |
+ ASSEMBLE_ATOMIC_STORE_INTEGER(sh); |
+ break; |
case kAtomicStoreWord32: |
- // TODO(binji): implement |
- __ nop(); |
+ ASSEMBLE_ATOMIC_STORE_INTEGER(sw); |
break; |
} |
return kSuccess; |