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 ab994a32e49b3b4f342d8d40a197f662d44a856b..0da312c6bc641f8aab8f2979c5e3beea2a03c330 100644 |
--- a/src/compiler/x64/code-generator-x64.cc |
+++ b/src/compiler/x64/code-generator-x64.cc |
@@ -2301,6 +2301,35 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
__ xchgl(i.InputRegister(0), i.MemoryOperand(1)); |
break; |
} |
+ case kAtomicCompareExchangeInt8: { |
+ __ lock(); |
+ __ cmpxchgb(i.MemoryOperand(2), i.InputRegister(1)); |
+ __ movsxbl(rax, rax); |
+ break; |
+ } |
+ case kAtomicCompareExchangeUint8: { |
+ __ lock(); |
+ __ cmpxchgb(i.MemoryOperand(2), i.InputRegister(1)); |
+ __ movzxbl(rax, rax); |
+ break; |
+ } |
+ case kAtomicCompareExchangeInt16: { |
+ __ lock(); |
+ __ cmpxchgw(i.MemoryOperand(2), i.InputRegister(1)); |
+ __ movsxwl(rax, rax); |
+ break; |
+ } |
+ case kAtomicCompareExchangeUint16: { |
+ __ lock(); |
+ __ cmpxchgw(i.MemoryOperand(2), i.InputRegister(1)); |
+ __ movzxwl(rax, rax); |
+ break; |
+ } |
+ case kAtomicCompareExchangeWord32: { |
+ __ lock(); |
+ __ cmpxchgl(i.MemoryOperand(2), i.InputRegister(1)); |
+ break; |
+ } |
case kAtomicLoadInt8: |
case kAtomicLoadUint8: |
case kAtomicLoadInt16: |