Chromium Code Reviews| 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 6b4ee00a56c103fc67661cdf1313ad3fd2e14ba4..3a4847b9a4c92bd47fc6641f11989b198a887aca 100644 |
| --- a/src/compiler/x64/code-generator-x64.cc |
| +++ b/src/compiler/x64/code-generator-x64.cc |
| @@ -2135,24 +2135,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
| } |
| break; |
| } |
| - case kX64Xchgb: { |
| - size_t index = 0; |
| - Operand operand = i.MemoryOperand(&index); |
| - __ xchgb(i.InputRegister(index), operand); |
| - break; |
| - } |
| - case kX64Xchgw: { |
| - size_t index = 0; |
| - Operand operand = i.MemoryOperand(&index); |
| - __ xchgw(i.InputRegister(index), operand); |
| - break; |
| - } |
| - case kX64Xchgl: { |
| - size_t index = 0; |
| - Operand operand = i.MemoryOperand(&index); |
| - __ xchgl(i.InputRegister(index), operand); |
| - break; |
| - } |
| case kX64Int32x4Create: { |
| CpuFeatureScope sse_scope(masm(), SSE4_1); |
| XMMRegister dst = i.OutputSimd128Register(); |
| @@ -2230,6 +2212,40 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
| case kX64StackCheck: |
| __ CompareRoot(rsp, Heap::kStackLimitRootIndex); |
| break; |
| +#define EXCHANGE_OPERANDS \ |
| + size_t index = 0; \ |
| + Register r = i.InputRegister(index++); \ |
|
binji
2017/02/22 02:08:38
same comment here as for ia32
aseemgarg
2017/02/22 03:29:02
Done.
|
| + Operand operand = i.MemoryOperand(&index); |
| + case kAtomicExchangeInt8: { |
| + EXCHANGE_OPERANDS |
| + __ xchgb(r, operand); |
| + __ movsxbl(r, r); |
| + break; |
| + } |
| + case kAtomicExchangeUint8: { |
| + EXCHANGE_OPERANDS |
| + __ xchgb(r, operand); |
| + __ movzxbl(r, r); |
| + break; |
| + } |
| + case kAtomicExchangeInt16: { |
| + EXCHANGE_OPERANDS |
| + __ xchgw(r, operand); |
| + __ movsxwl(r, r); |
| + break; |
| + } |
| + case kAtomicExchangeUint16: { |
| + EXCHANGE_OPERANDS |
| + __ xchgw(r, operand); |
| + __ movzxwl(r, r); |
| + break; |
| + } |
| + case kAtomicExchangeWord32: { |
| + EXCHANGE_OPERANDS |
| + __ xchgl(r, operand); |
| + break; |
| + } |
| +#undef EXCHANGE_OPERANDS |
| case kAtomicLoadInt8: |
| case kAtomicLoadUint8: |
| case kAtomicLoadInt16: |