Index: src/compiler/ia32/code-generator-ia32.cc |
diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc |
index 369699067e2b8b9d8dc65ad5e9b322be0dfc9ff3..0f6d1c3a4a8ff7db2ed2a07436e3a96e542bbe16 100644 |
--- a/src/compiler/ia32/code-generator-ia32.cc |
+++ b/src/compiler/ia32/code-generator-ia32.cc |
@@ -1888,24 +1888,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
} |
break; |
} |
- case kIA32Xchgb: { |
- size_t index = 0; |
- Operand operand = i.MemoryOperand(&index); |
- __ xchg_b(i.InputRegister(index), operand); |
- break; |
- } |
- case kIA32Xchgw: { |
- size_t index = 0; |
- Operand operand = i.MemoryOperand(&index); |
- __ xchg_w(i.InputRegister(index), operand); |
- break; |
- } |
- case kIA32Xchgl: { |
- size_t index = 0; |
- Operand operand = i.MemoryOperand(&index); |
- __ xchg(i.InputRegister(index), operand); |
- break; |
- } |
case kCheckedLoadInt8: |
ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); |
break; |
@@ -1952,6 +1934,30 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
case kCheckedStoreWord64: |
UNREACHABLE(); // currently unsupported checked int64 load/store. |
break; |
+ case kAtomicExchangeInt8: { |
+ __ xchg_b(i.InputRegister(0), i.MemoryOperand(1)); |
+ __ movsx_b(i.InputRegister(0), i.InputRegister(0)); |
+ break; |
+ } |
+ case kAtomicExchangeUint8: { |
+ __ xchg_b(i.InputRegister(0), i.MemoryOperand(1)); |
+ __ movzx_b(i.InputRegister(0), i.InputRegister(0)); |
+ break; |
+ } |
+ case kAtomicExchangeInt16: { |
+ __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); |
+ __ movsx_w(i.InputRegister(0), i.InputRegister(0)); |
+ break; |
+ } |
+ case kAtomicExchangeUint16: { |
+ __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); |
+ __ movzx_w(i.InputRegister(0), i.InputRegister(0)); |
+ break; |
+ } |
+ case kAtomicExchangeWord32: { |
+ __ xchg(i.InputRegister(0), i.MemoryOperand(1)); |
+ break; |
+ } |
case kAtomicLoadInt8: |
case kAtomicLoadUint8: |
case kAtomicLoadInt16: |