Index: src/compiler/x64/code-generator-x64.cc |
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc |
index 1a96a3a4c7950bdc9abbace94c806af4e1fdd954..7ecf442fc612a517498a1250ddfffc623b04eb28 100644 |
--- a/src/compiler/x64/code-generator-x64.cc |
+++ b/src/compiler/x64/code-generator-x64.cc |
@@ -2243,6 +2243,30 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
__ xchgl(i.InputRegister(0), i.MemoryOperand(1)); |
break; |
} |
+ case kAtomicCompareExchangeInt8: { |
+ __ cmpxchgb(i.MemoryOperand(2), i.InputRegister(1)); |
+ __ movsxbl(rax, rax); |
+ break; |
+ } |
+ case kAtomicCompareExchangeUint8: { |
+ __ cmpxchgb(i.MemoryOperand(2), i.InputRegister(1)); |
+ __ movzxbl(rax, rax); |
+ break; |
+ } |
+ case kAtomicCompareExchangeInt16: { |
+ __ cmpxchgw(i.MemoryOperand(2), i.InputRegister(1)); |
+ __ movsxwl(rax, rax); |
+ break; |
+ } |
+ case kAtomicCompareExchangeUint16: { |
+ __ cmpxchgw(i.MemoryOperand(2), i.InputRegister(1)); |
+ __ movzxwl(rax, rax); |
+ break; |
+ } |
+ case kAtomicCompareExchangeWord32: { |
+ __ cmpxchgl(i.MemoryOperand(2), i.InputRegister(1)); |
+ break; |
+ } |
case kAtomicLoadInt8: |
case kAtomicLoadUint8: |
case kAtomicLoadInt16: |