Commit 1d5013f9 authored by andrew-cc-chen's avatar andrew-cc-chen Committed by Commit Bot

[ppc] cleaned up atomic64 ops

Change-Id: Id27bfca6f49d4ec351988a597307558cd75ecf56
Reviewed-on: https://chromium-review.googlesource.com/c/1278499Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56868}
parent 4b2282b3
...@@ -1979,82 +1979,69 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -1979,82 +1979,69 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
ASSEMBLE_ATOMIC_LOAD_INTEGER(lbz, lbzx); ASSEMBLE_ATOMIC_LOAD_INTEGER(lbz, lbzx);
__ extsb(i.OutputRegister(), i.OutputRegister()); __ extsb(i.OutputRegister(), i.OutputRegister());
break; break;
case kPPC_Word64AtomicLoadUint8: case kPPC_AtomicLoadUint8:
case kWord32AtomicLoadUint8:
ASSEMBLE_ATOMIC_LOAD_INTEGER(lbz, lbzx); ASSEMBLE_ATOMIC_LOAD_INTEGER(lbz, lbzx);
break; break;
case kWord32AtomicLoadInt16: case kWord32AtomicLoadInt16:
ASSEMBLE_ATOMIC_LOAD_INTEGER(lha, lhax); ASSEMBLE_ATOMIC_LOAD_INTEGER(lha, lhax);
break; break;
case kPPC_Word64AtomicLoadUint16: case kPPC_AtomicLoadUint16:
case kWord32AtomicLoadUint16:
ASSEMBLE_ATOMIC_LOAD_INTEGER(lhz, lhzx); ASSEMBLE_ATOMIC_LOAD_INTEGER(lhz, lhzx);
break; break;
case kPPC_Word64AtomicLoadUint32: case kPPC_AtomicLoadWord32:
case kWord32AtomicLoadWord32:
ASSEMBLE_ATOMIC_LOAD_INTEGER(lwz, lwzx); ASSEMBLE_ATOMIC_LOAD_INTEGER(lwz, lwzx);
break; break;
case kPPC_Word64AtomicLoadUint64: case kPPC_AtomicLoadWord64:
ASSEMBLE_ATOMIC_LOAD_INTEGER(ld, ldx); ASSEMBLE_ATOMIC_LOAD_INTEGER(ld, ldx);
break; break;
case kPPC_AtomicStoreUint8:
case kPPC_Word64AtomicStoreUint8:
case kWord32AtomicStoreWord8:
ASSEMBLE_ATOMIC_STORE_INTEGER(stb, stbx); ASSEMBLE_ATOMIC_STORE_INTEGER(stb, stbx);
break; break;
case kPPC_Word64AtomicStoreUint16: case kPPC_AtomicStoreUint16:
case kWord32AtomicStoreWord16:
ASSEMBLE_ATOMIC_STORE_INTEGER(sth, sthx); ASSEMBLE_ATOMIC_STORE_INTEGER(sth, sthx);
break; break;
case kPPC_Word64AtomicStoreUint32: case kPPC_AtomicStoreWord32:
case kWord32AtomicStoreWord32:
ASSEMBLE_ATOMIC_STORE_INTEGER(stw, stwx); ASSEMBLE_ATOMIC_STORE_INTEGER(stw, stwx);
break; break;
case kPPC_Word64AtomicStoreUint64: case kPPC_AtomicStoreWord64:
ASSEMBLE_ATOMIC_STORE_INTEGER(std, stdx); ASSEMBLE_ATOMIC_STORE_INTEGER(std, stdx);
break; break;
case kWord32AtomicExchangeInt8: case kWord32AtomicExchangeInt8:
ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lbarx, stbcx); ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lbarx, stbcx);
__ extsb(i.OutputRegister(0), i.OutputRegister(0)); __ extsb(i.OutputRegister(0), i.OutputRegister(0));
break; break;
case kPPC_Word64AtomicExchangeUint8: case kPPC_AtomicExchangeUint8:
case kWord32AtomicExchangeUint8:
ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lbarx, stbcx); ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lbarx, stbcx);
break; break;
case kWord32AtomicExchangeInt16: case kWord32AtomicExchangeInt16:
ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lharx, sthcx); ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lharx, sthcx);
__ extsh(i.OutputRegister(0), i.OutputRegister(0)); __ extsh(i.OutputRegister(0), i.OutputRegister(0));
break; break;
case kPPC_Word64AtomicExchangeUint16: case kPPC_AtomicExchangeUint16:
case kWord32AtomicExchangeUint16:
ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lharx, sthcx); ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lharx, sthcx);
break; break;
case kPPC_Word64AtomicExchangeUint32: case kPPC_AtomicExchangeWord32:
case kWord32AtomicExchangeWord32:
ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lwarx, stwcx); ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lwarx, stwcx);
break; break;
case kPPC_Word64AtomicExchangeUint64: case kPPC_AtomicExchangeWord64:
ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(ldarx, stdcx); ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(ldarx, stdcx);
break; break;
case kWord32AtomicCompareExchangeInt8: case kWord32AtomicCompareExchangeInt8:
ASSEMBLE_ATOMIC_COMPARE_EXCHANGE_SIGN_EXT(cmp, lbarx, stbcx, extsb); ASSEMBLE_ATOMIC_COMPARE_EXCHANGE_SIGN_EXT(cmp, lbarx, stbcx, extsb);
break; break;
case kPPC_Word64AtomicCompareExchangeUint8: case kPPC_AtomicCompareExchangeUint8:
case kWord32AtomicCompareExchangeUint8:
ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmp, lbarx, stbcx); ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmp, lbarx, stbcx);
break; break;
case kWord32AtomicCompareExchangeInt16: case kWord32AtomicCompareExchangeInt16:
ASSEMBLE_ATOMIC_COMPARE_EXCHANGE_SIGN_EXT(cmp, lharx, sthcx, extsh); ASSEMBLE_ATOMIC_COMPARE_EXCHANGE_SIGN_EXT(cmp, lharx, sthcx, extsh);
break; break;
case kPPC_Word64AtomicCompareExchangeUint16: case kPPC_AtomicCompareExchangeUint16:
case kWord32AtomicCompareExchangeUint16:
ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmp, lharx, sthcx); ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmp, lharx, sthcx);
break; break;
case kPPC_Word64AtomicCompareExchangeUint32: case kPPC_AtomicCompareExchangeWord32:
case kWord32AtomicCompareExchangeWord32:
ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmpw, lwarx, stwcx); ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmpw, lwarx, stwcx);
break; break;
case kPPC_Word64AtomicCompareExchangeUint64: case kPPC_AtomicCompareExchangeWord64:
ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmp, ldarx, stdcx); ASSEMBLE_ATOMIC_COMPARE_EXCHANGE(cmp, ldarx, stdcx);
break; break;
...@@ -2062,20 +2049,20 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -2062,20 +2049,20 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kWord32Atomic##op##Int8: \ case kWord32Atomic##op##Int8: \
ASSEMBLE_ATOMIC_BINOP_SIGN_EXT(inst, lbarx, stbcx, extsb); \ ASSEMBLE_ATOMIC_BINOP_SIGN_EXT(inst, lbarx, stbcx, extsb); \
break; \ break; \
case kPPC_Word64Atomic##op##Uint8: \ case kPPC_Atomic##op##Uint8: \
case kWord32Atomic##op##Uint8: \
ASSEMBLE_ATOMIC_BINOP(inst, lbarx, stbcx); \ ASSEMBLE_ATOMIC_BINOP(inst, lbarx, stbcx); \
break; \ break; \
case kWord32Atomic##op##Int16: \ case kWord32Atomic##op##Int16: \
ASSEMBLE_ATOMIC_BINOP_SIGN_EXT(inst, lharx, sthcx, extsh); \ ASSEMBLE_ATOMIC_BINOP_SIGN_EXT(inst, lharx, sthcx, extsh); \
break; \ break; \
case kPPC_Word64Atomic##op##Uint16: \ case kPPC_Atomic##op##Uint16: \
case kWord32Atomic##op##Uint16: \
ASSEMBLE_ATOMIC_BINOP(inst, lharx, sthcx); \ ASSEMBLE_ATOMIC_BINOP(inst, lharx, sthcx); \
break; \ break; \
case kPPC_Word64Atomic##op##Uint32: \ case kPPC_Atomic##op##Word32: \
case kWord32Atomic##op##Word32: \
ASSEMBLE_ATOMIC_BINOP(inst, lwarx, stwcx); \ ASSEMBLE_ATOMIC_BINOP(inst, lwarx, stwcx); \
break; \
case kPPC_Atomic##op##Word64: \
ASSEMBLE_ATOMIC_BINOP(inst, ldarx, stdcx); \
break; break;
ATOMIC_BINOP_CASE(Add, add) ATOMIC_BINOP_CASE(Add, add)
ATOMIC_BINOP_CASE(Sub, sub) ATOMIC_BINOP_CASE(Sub, sub)
...@@ -2084,17 +2071,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -2084,17 +2071,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
ATOMIC_BINOP_CASE(Xor, xor_) ATOMIC_BINOP_CASE(Xor, xor_)
#undef ATOMIC_BINOP_CASE #undef ATOMIC_BINOP_CASE
#define ATOMIC64_BINOP_CASE(op, inst) \
case kPPC_Word64Atomic##op##Uint64: \
ASSEMBLE_ATOMIC_BINOP(inst, ldarx, stdcx); \
break;
ATOMIC64_BINOP_CASE(Add, add)
ATOMIC64_BINOP_CASE(Sub, sub)
ATOMIC64_BINOP_CASE(And, and_)
ATOMIC64_BINOP_CASE(Or, orx)
ATOMIC64_BINOP_CASE(Xor, xor_)
#undef ATOMIC64_BINOP_CASE
case kPPC_ByteRev32: { case kPPC_ByteRev32: {
Register input = i.InputRegister(0); Register input = i.InputRegister(0);
Register output = i.OutputRegister(); Register output = i.OutputRegister();
......
This diff is collapsed.
...@@ -135,44 +135,44 @@ int InstructionScheduler::GetTargetInstructionFlags( ...@@ -135,44 +135,44 @@ int InstructionScheduler::GetTargetInstructionFlags(
case kPPC_StoreToStackSlot: case kPPC_StoreToStackSlot:
return kHasSideEffect; return kHasSideEffect;
case kPPC_Word64AtomicLoadUint8: case kPPC_AtomicLoadUint8:
case kPPC_Word64AtomicLoadUint16: case kPPC_AtomicLoadUint16:
case kPPC_Word64AtomicLoadUint32: case kPPC_AtomicLoadWord32:
case kPPC_Word64AtomicLoadUint64: case kPPC_AtomicLoadWord64:
return kIsLoadOperation; return kIsLoadOperation;
case kPPC_Word64AtomicStoreUint8: case kPPC_AtomicStoreUint8:
case kPPC_Word64AtomicStoreUint16: case kPPC_AtomicStoreUint16:
case kPPC_Word64AtomicStoreUint32: case kPPC_AtomicStoreWord32:
case kPPC_Word64AtomicStoreUint64: case kPPC_AtomicStoreWord64:
case kPPC_Word64AtomicExchangeUint8: case kPPC_AtomicExchangeUint8:
case kPPC_Word64AtomicExchangeUint16: case kPPC_AtomicExchangeUint16:
case kPPC_Word64AtomicExchangeUint32: case kPPC_AtomicExchangeWord32:
case kPPC_Word64AtomicExchangeUint64: case kPPC_AtomicExchangeWord64:
case kPPC_Word64AtomicCompareExchangeUint8: case kPPC_AtomicCompareExchangeUint8:
case kPPC_Word64AtomicCompareExchangeUint16: case kPPC_AtomicCompareExchangeUint16:
case kPPC_Word64AtomicCompareExchangeUint32: case kPPC_AtomicCompareExchangeWord32:
case kPPC_Word64AtomicCompareExchangeUint64: case kPPC_AtomicCompareExchangeWord64:
case kPPC_Word64AtomicAddUint8: case kPPC_AtomicAddUint8:
case kPPC_Word64AtomicAddUint16: case kPPC_AtomicAddUint16:
case kPPC_Word64AtomicAddUint32: case kPPC_AtomicAddWord32:
case kPPC_Word64AtomicAddUint64: case kPPC_AtomicAddWord64:
case kPPC_Word64AtomicSubUint8: case kPPC_AtomicSubUint8:
case kPPC_Word64AtomicSubUint16: case kPPC_AtomicSubUint16:
case kPPC_Word64AtomicSubUint32: case kPPC_AtomicSubWord32:
case kPPC_Word64AtomicSubUint64: case kPPC_AtomicSubWord64:
case kPPC_Word64AtomicAndUint8: case kPPC_AtomicAndUint8:
case kPPC_Word64AtomicAndUint16: case kPPC_AtomicAndUint16:
case kPPC_Word64AtomicAndUint32: case kPPC_AtomicAndWord32:
case kPPC_Word64AtomicAndUint64: case kPPC_AtomicAndWord64:
case kPPC_Word64AtomicOrUint8: case kPPC_AtomicOrUint8:
case kPPC_Word64AtomicOrUint16: case kPPC_AtomicOrUint16:
case kPPC_Word64AtomicOrUint32: case kPPC_AtomicOrWord32:
case kPPC_Word64AtomicOrUint64: case kPPC_AtomicOrWord64:
case kPPC_Word64AtomicXorUint8: case kPPC_AtomicXorUint8:
case kPPC_Word64AtomicXorUint16: case kPPC_AtomicXorUint16:
case kPPC_Word64AtomicXorUint32: case kPPC_AtomicXorWord32:
case kPPC_Word64AtomicXorUint64: case kPPC_AtomicXorWord64:
return kHasSideEffect; return kHasSideEffect;
#define CASE(Name) case k##Name: #define CASE(Name) case k##Name:
......
...@@ -1940,14 +1940,14 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) { ...@@ -1940,14 +1940,14 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = opcode =
load_rep.IsSigned() ? kWord32AtomicLoadInt8 : kWord32AtomicLoadUint8; load_rep.IsSigned() ? kWord32AtomicLoadInt8 : kPPC_AtomicLoadUint8;
break; break;
case MachineRepresentation::kWord16: case MachineRepresentation::kWord16:
opcode = load_rep.IsSigned() ? kWord32AtomicLoadInt16 opcode =
: kWord32AtomicLoadUint16; load_rep.IsSigned() ? kWord32AtomicLoadInt16 : kPPC_AtomicLoadUint16;
break; break;
case MachineRepresentation::kWord32: case MachineRepresentation::kWord32:
opcode = kWord32AtomicLoadWord32; opcode = kPPC_AtomicLoadWord32;
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
...@@ -1965,16 +1965,16 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) { ...@@ -1965,16 +1965,16 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode = kArchNop;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kPPC_Word64AtomicLoadUint8; opcode = kPPC_AtomicLoadUint8;
break; break;
case MachineRepresentation::kWord16: case MachineRepresentation::kWord16:
opcode = kPPC_Word64AtomicLoadUint16; opcode = kPPC_AtomicLoadUint16;
break; break;
case MachineRepresentation::kWord32: case MachineRepresentation::kWord32:
opcode = kPPC_Word64AtomicLoadUint32; opcode = kPPC_AtomicLoadWord32;
break; break;
case MachineRepresentation::kWord64: case MachineRepresentation::kWord64:
opcode = kPPC_Word64AtomicLoadUint64; opcode = kPPC_AtomicLoadWord64;
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
...@@ -1993,13 +1993,13 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) { ...@@ -1993,13 +1993,13 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode = kArchNop;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kWord32AtomicStoreWord8; opcode = kPPC_AtomicStoreUint8;
break; break;
case MachineRepresentation::kWord16: case MachineRepresentation::kWord16:
opcode = kWord32AtomicStoreWord16; opcode = kPPC_AtomicStoreUint16;
break; break;
case MachineRepresentation::kWord32: case MachineRepresentation::kWord32:
opcode = kWord32AtomicStoreWord32; opcode = kPPC_AtomicStoreWord32;
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
...@@ -2024,16 +2024,16 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) { ...@@ -2024,16 +2024,16 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode = kArchNop;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kPPC_Word64AtomicStoreUint8; opcode = kPPC_AtomicStoreUint8;
break; break;
case MachineRepresentation::kWord16: case MachineRepresentation::kWord16:
opcode = kPPC_Word64AtomicStoreUint16; opcode = kPPC_AtomicStoreUint16;
break; break;
case MachineRepresentation::kWord32: case MachineRepresentation::kWord32:
opcode = kPPC_Word64AtomicStoreUint32; opcode = kPPC_AtomicStoreWord32;
break; break;
case MachineRepresentation::kWord64: case MachineRepresentation::kWord64:
opcode = kPPC_Word64AtomicStoreUint64; opcode = kPPC_AtomicStoreWord64;
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
...@@ -2074,13 +2074,13 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -2074,13 +2074,13 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
opcode = kWord32AtomicExchangeUint8; opcode = kPPC_AtomicExchangeUint8;
} else if (type == MachineType::Int16()) { } else if (type == MachineType::Int16()) {
opcode = kWord32AtomicExchangeInt16; opcode = kWord32AtomicExchangeInt16;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
opcode = kWord32AtomicExchangeUint16; opcode = kPPC_AtomicExchangeUint16;
} else if (type == MachineType::Int32() || type == MachineType::Uint32()) { } else if (type == MachineType::Int32() || type == MachineType::Uint32()) {
opcode = kWord32AtomicExchangeWord32; opcode = kPPC_AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return; return;
...@@ -2092,13 +2092,13 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) { ...@@ -2092,13 +2092,13 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kPPC_Word64AtomicExchangeUint8; opcode = kPPC_AtomicExchangeUint8;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
opcode = kPPC_Word64AtomicExchangeUint16; opcode = kPPC_AtomicExchangeUint16;
} else if (type == MachineType::Uint32()) { } else if (type == MachineType::Uint32()) {
opcode = kPPC_Word64AtomicExchangeUint32; opcode = kPPC_AtomicExchangeWord32;
} else if (type == MachineType::Uint64()) { } else if (type == MachineType::Uint64()) {
opcode = kPPC_Word64AtomicExchangeUint64; opcode = kPPC_AtomicExchangeWord64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return; return;
...@@ -2137,13 +2137,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -2137,13 +2137,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
opcode = kWord32AtomicCompareExchangeUint8; opcode = kPPC_AtomicCompareExchangeUint8;
} else if (type == MachineType::Int16()) { } else if (type == MachineType::Int16()) {
opcode = kWord32AtomicCompareExchangeInt16; opcode = kWord32AtomicCompareExchangeInt16;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
opcode = kWord32AtomicCompareExchangeUint16; opcode = kPPC_AtomicCompareExchangeUint16;
} else if (type == MachineType::Int32() || type == MachineType::Uint32()) { } else if (type == MachineType::Int32() || type == MachineType::Uint32()) {
opcode = kWord32AtomicCompareExchangeWord32; opcode = kPPC_AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return; return;
...@@ -2155,13 +2155,13 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { ...@@ -2155,13 +2155,13 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode = kArchNop;
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kPPC_Word64AtomicCompareExchangeUint8; opcode = kPPC_AtomicCompareExchangeUint8;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
opcode = kPPC_Word64AtomicCompareExchangeUint16; opcode = kPPC_AtomicCompareExchangeUint16;
} else if (type == MachineType::Uint32()) { } else if (type == MachineType::Uint32()) {
opcode = kPPC_Word64AtomicCompareExchangeUint32; opcode = kPPC_AtomicCompareExchangeWord32;
} else if (type == MachineType::Uint64()) { } else if (type == MachineType::Uint64()) {
opcode = kPPC_Word64AtomicCompareExchangeUint64; opcode = kPPC_AtomicCompareExchangeWord64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return; return;
...@@ -2215,12 +2215,12 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2215,12 +2215,12 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
VisitAtomicBinaryOperation(this, node, opcode); VisitAtomicBinaryOperation(this, node, opcode);
} }
#define VISIT_ATOMIC_BINOP(op) \ #define VISIT_ATOMIC_BINOP(op) \
void InstructionSelector::VisitWord32Atomic##op(Node* node) { \ void InstructionSelector::VisitWord32Atomic##op(Node* node) { \
VisitWord32AtomicBinaryOperation( \ VisitWord32AtomicBinaryOperation( \
node, kWord32Atomic##op##Int8, kWord32Atomic##op##Uint8, \ node, kWord32Atomic##op##Int8, kPPC_Atomic##op##Uint8, \
kWord32Atomic##op##Int16, kWord32Atomic##op##Uint16, \ kWord32Atomic##op##Int16, kPPC_Atomic##op##Uint16, \
kWord32Atomic##op##Word32); \ kPPC_Atomic##op##Word32); \
} }
VISIT_ATOMIC_BINOP(Add) VISIT_ATOMIC_BINOP(Add)
VISIT_ATOMIC_BINOP(Sub) VISIT_ATOMIC_BINOP(Sub)
...@@ -2234,7 +2234,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation( ...@@ -2234,7 +2234,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation(
ArchOpcode uint64_op) { ArchOpcode uint64_op) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode = kArchNop;
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = uint8_op; opcode = uint8_op;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
...@@ -2250,11 +2249,11 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation( ...@@ -2250,11 +2249,11 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation(
VisitAtomicBinaryOperation(this, node, opcode); VisitAtomicBinaryOperation(this, node, opcode);
} }
#define VISIT_ATOMIC64_BINOP(op) \ #define VISIT_ATOMIC64_BINOP(op) \
void InstructionSelector::VisitWord64Atomic##op(Node* node) { \ void InstructionSelector::VisitWord64Atomic##op(Node* node) { \
VisitWord64AtomicBinaryOperation( \ VisitWord64AtomicBinaryOperation( \
node, kPPC_Word64Atomic##op##Uint8, kPPC_Word64Atomic##op##Uint16, \ node, kPPC_Atomic##op##Uint8, kPPC_Atomic##op##Uint16, \
kPPC_Word64Atomic##op##Uint32, kPPC_Word64Atomic##op##Uint64); \ kPPC_Atomic##op##Word32, kPPC_Atomic##op##Word64); \
} }
VISIT_ATOMIC64_BINOP(Add) VISIT_ATOMIC64_BINOP(Add)
VISIT_ATOMIC64_BINOP(Sub) VISIT_ATOMIC64_BINOP(Sub)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment