Commit 8512973b authored by Deepti Gandluri's avatar Deepti Gandluri Committed by Commit Bot

Fix inconsistent use of Type/Representation

Functions/variables for some atomic memory operators use type,
representation interchangeably. Fix to make it consistent.

Bug: v8:7754, v8:6532
Change-Id: I16ae35b72728739aee4bc67287317c2fd4a9088a
Reviewed-on: https://chromium-review.googlesource.com/1152462Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54763}
parent 6b5cfc1b
......@@ -2100,7 +2100,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -2136,7 +2136,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* old_value = node->InputAt(2);
Node* new_value = node->InputAt(3);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -2175,7 +2175,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = int8_op;
} else if (type == MachineType::Uint8()) {
......
......@@ -2742,7 +2742,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -2762,7 +2762,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) {
opcode = kArm64Word64AtomicExchangeUint8;
} else if (type == MachineType::Uint16()) {
......@@ -2780,7 +2780,7 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -2800,7 +2800,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) {
opcode = kArm64Word64AtomicCompareExchangeUint8;
} else if (type == MachineType::Uint16()) {
......@@ -2820,7 +2820,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* node, ArchOpcode int8_op, ArchOpcode uint8_op, ArchOpcode int16_op,
ArchOpcode uint16_op, ArchOpcode word32_op) {
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = int8_op;
} else if (type == MachineType::Uint8()) {
......@@ -2856,7 +2856,7 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation(
Node* node, ArchOpcode uint8_op, ArchOpcode uint16_op, ArchOpcode uint32_op,
ArchOpcode uint64_op) {
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) {
opcode = uint8_op;
} else if (type == MachineType::Uint16()) {
......
......@@ -1608,7 +1608,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
IA32OperandGenerator g(this);
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8;
......@@ -1634,7 +1634,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* old_value = node->InputAt(2);
Node* new_value = node->InputAt(3);
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8;
......@@ -1681,7 +1681,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
opcode = int8_op;
......
......@@ -1705,11 +1705,11 @@ void InstructionSelector::VisitNode(Node* node) {
return VisitWord32AtomicStore(node);
case IrOpcode::kWord64AtomicStore:
return VisitWord64AtomicStore(node);
#define ATOMIC_CASE(name, rep) \
case IrOpcode::k##rep##Atomic##name: { \
MachineType type = AtomicOpRepresentationOf(node->op()); \
MarkAsRepresentation(type.representation(), node); \
return Visit##rep##Atomic##name(node); \
#define ATOMIC_CASE(name, rep) \
case IrOpcode::k##rep##Atomic##name: { \
MachineType type = AtomicOpType(node->op()); \
MarkAsRepresentation(type.representation(), node); \
return Visit##rep##Atomic##name(node); \
}
ATOMIC_CASE(Add, Word32)
ATOMIC_CASE(Add, Word64)
......
......@@ -155,7 +155,7 @@ class MachineRepresentationInferrer {
case IrOpcode::kWord32AtomicOr:
case IrOpcode::kWord32AtomicXor:
representation_vector_[node->id()] = PromoteRepresentation(
AtomicOpRepresentationOf(node->op()).representation());
AtomicOpType(node->op()).representation());
break;
case IrOpcode::kStore:
case IrOpcode::kProtectedStore:
......
......@@ -84,7 +84,7 @@ MachineRepresentation AtomicStoreRepresentationOf(Operator const* op) {
return OpParameter<MachineRepresentation>(op);
}
MachineType AtomicOpRepresentationOf(Operator const* op) {
MachineType AtomicOpType(Operator const* op) {
return OpParameter<MachineType>(op);
}
......@@ -965,10 +965,10 @@ const Operator* MachineOperatorBuilder::Word32AtomicStore(
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word32AtomicExchange(MachineType rep) {
#define EXCHANGE(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord32AtomicExchange##kRep; \
const Operator* MachineOperatorBuilder::Word32AtomicExchange(MachineType type) {
#define EXCHANGE(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord32AtomicExchange##kType; \
}
ATOMIC_TYPE_LIST(EXCHANGE)
#undef EXCHANGE
......@@ -976,60 +976,60 @@ const Operator* MachineOperatorBuilder::Word32AtomicExchange(MachineType rep) {
}
const Operator* MachineOperatorBuilder::Word32AtomicCompareExchange(
MachineType rep) {
#define COMPARE_EXCHANGE(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord32AtomicCompareExchange##kRep; \
MachineType type) {
#define COMPARE_EXCHANGE(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord32AtomicCompareExchange##kType; \
}
ATOMIC_TYPE_LIST(COMPARE_EXCHANGE)
#undef COMPARE_EXCHANGE
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word32AtomicAdd(MachineType rep) {
#define ADD(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord32AtomicAdd##kRep; \
const Operator* MachineOperatorBuilder::Word32AtomicAdd(MachineType type) {
#define ADD(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord32AtomicAdd##kType; \
}
ATOMIC_TYPE_LIST(ADD)
#undef ADD
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word32AtomicSub(MachineType rep) {
#define SUB(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord32AtomicSub##kRep; \
const Operator* MachineOperatorBuilder::Word32AtomicSub(MachineType type) {
#define SUB(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord32AtomicSub##kType; \
}
ATOMIC_TYPE_LIST(SUB)
#undef SUB
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word32AtomicAnd(MachineType rep) {
#define AND(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord32AtomicAnd##kRep; \
const Operator* MachineOperatorBuilder::Word32AtomicAnd(MachineType type) {
#define AND(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord32AtomicAnd##kType; \
}
ATOMIC_TYPE_LIST(AND)
#undef AND
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word32AtomicOr(MachineType rep) {
#define OR(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord32AtomicOr##kRep; \
const Operator* MachineOperatorBuilder::Word32AtomicOr(MachineType type) {
#define OR(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord32AtomicOr##kType; \
}
ATOMIC_TYPE_LIST(OR)
#undef OR
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word32AtomicXor(MachineType rep) {
#define XOR(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord32AtomicXor##kRep; \
const Operator* MachineOperatorBuilder::Word32AtomicXor(MachineType type) {
#define XOR(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord32AtomicXor##kType; \
}
ATOMIC_TYPE_LIST(XOR)
#undef XOR
......@@ -1070,60 +1070,60 @@ const Operator* MachineOperatorBuilder::Word64AtomicStore(
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word64AtomicAdd(MachineType rep) {
#define ADD(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord64AtomicAdd##kRep; \
const Operator* MachineOperatorBuilder::Word64AtomicAdd(MachineType type) {
#define ADD(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord64AtomicAdd##kType; \
}
ATOMIC64_TYPE_LIST(ADD)
#undef ADD
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word64AtomicSub(MachineType rep) {
#define SUB(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord64AtomicSub##kRep; \
const Operator* MachineOperatorBuilder::Word64AtomicSub(MachineType type) {
#define SUB(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord64AtomicSub##kType; \
}
ATOMIC64_TYPE_LIST(SUB)
#undef SUB
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word64AtomicAnd(MachineType rep) {
#define AND(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord64AtomicAnd##kRep; \
const Operator* MachineOperatorBuilder::Word64AtomicAnd(MachineType type) {
#define AND(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord64AtomicAnd##kType; \
}
ATOMIC64_TYPE_LIST(AND)
#undef AND
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word64AtomicOr(MachineType rep) {
#define OR(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord64AtomicOr##kRep; \
const Operator* MachineOperatorBuilder::Word64AtomicOr(MachineType type) {
#define OR(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord64AtomicOr##kType; \
}
ATOMIC64_TYPE_LIST(OR)
#undef OR
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word64AtomicXor(MachineType rep) {
#define XOR(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord64AtomicXor##kRep; \
const Operator* MachineOperatorBuilder::Word64AtomicXor(MachineType type) {
#define XOR(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord64AtomicXor##kType; \
}
ATOMIC64_TYPE_LIST(XOR)
#undef XOR
UNREACHABLE();
}
const Operator* MachineOperatorBuilder::Word64AtomicExchange(MachineType rep) {
#define EXCHANGE(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord64AtomicExchange##kRep; \
const Operator* MachineOperatorBuilder::Word64AtomicExchange(MachineType type) {
#define EXCHANGE(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord64AtomicExchange##kType; \
}
ATOMIC64_TYPE_LIST(EXCHANGE)
#undef EXCHANGE
......@@ -1131,10 +1131,10 @@ const Operator* MachineOperatorBuilder::Word64AtomicExchange(MachineType rep) {
}
const Operator* MachineOperatorBuilder::Word64AtomicCompareExchange(
MachineType rep) {
#define COMPARE_EXCHANGE(kRep) \
if (rep == MachineType::kRep()) { \
return &cache_.kWord64AtomicCompareExchange##kRep; \
MachineType type) {
#define COMPARE_EXCHANGE(kType) \
if (type == MachineType::kType()) { \
return &cache_.kWord64AtomicCompareExchange##kType; \
}
ATOMIC64_TYPE_LIST(COMPARE_EXCHANGE)
#undef COMPARE_EXCHANGE
......
......@@ -110,7 +110,7 @@ V8_EXPORT_PRIVATE StackSlotRepresentation const& StackSlotRepresentationOf(
MachineRepresentation AtomicStoreRepresentationOf(Operator const* op)
V8_WARN_UNUSED_RESULT;
MachineType AtomicOpRepresentationOf(Operator const* op) V8_WARN_UNUSED_RESULT;
MachineType AtomicOpType(Operator const* op) V8_WARN_UNUSED_RESULT;
// Interface for building machine-level operators. These operators are
// machine-level but machine-independent and thus define a language suitable
......@@ -624,33 +624,33 @@ class V8_EXPORT_PRIVATE MachineOperatorBuilder final
// atomic-store [base + index], value
const Operator* Word64AtomicStore(MachineRepresentation rep);
// atomic-exchange [base + index], value
const Operator* Word32AtomicExchange(MachineType rep);
const Operator* Word32AtomicExchange(MachineType type);
// atomic-exchange [base + index], value
const Operator* Word64AtomicExchange(MachineType rep);
const Operator* Word64AtomicExchange(MachineType type);
// atomic-compare-exchange [base + index], old_value, new_value
const Operator* Word32AtomicCompareExchange(MachineType rep);
const Operator* Word32AtomicCompareExchange(MachineType type);
// atomic-compare-exchange [base + index], old_value, new_value
const Operator* Word64AtomicCompareExchange(MachineType rep);
const Operator* Word64AtomicCompareExchange(MachineType type);
// atomic-add [base + index], value
const Operator* Word32AtomicAdd(MachineType rep);
const Operator* Word32AtomicAdd(MachineType type);
// atomic-sub [base + index], value
const Operator* Word32AtomicSub(MachineType rep);
const Operator* Word32AtomicSub(MachineType type);
// atomic-and [base + index], value
const Operator* Word32AtomicAnd(MachineType rep);
const Operator* Word32AtomicAnd(MachineType type);
// atomic-or [base + index], value
const Operator* Word32AtomicOr(MachineType rep);
const Operator* Word32AtomicOr(MachineType type);
// atomic-xor [base + index], value
const Operator* Word32AtomicXor(MachineType rep);
const Operator* Word32AtomicXor(MachineType type);
// atomic-load [base + index]
const Operator* Word64AtomicAdd(MachineType rep);
const Operator* Word64AtomicAdd(MachineType type);
// atomic-sub [base + index], value
const Operator* Word64AtomicSub(MachineType rep);
const Operator* Word64AtomicSub(MachineType type);
// atomic-and [base + index], value
const Operator* Word64AtomicAnd(MachineType rep);
const Operator* Word64AtomicAnd(MachineType type);
// atomic-or [base + index], value
const Operator* Word64AtomicOr(MachineType rep);
const Operator* Word64AtomicOr(MachineType type);
// atomic-xor [base + index], value
const Operator* Word64AtomicXor(MachineType rep);
const Operator* Word64AtomicXor(MachineType type);
const OptionalOperator SpeculationFence();
......
......@@ -1778,7 +1778,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -1817,7 +1817,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* old_value = node->InputAt(2);
Node* new_value = node->InputAt(3);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -1858,7 +1858,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = int8_op;
} else if (type == MachineType::Uint8()) {
......
......@@ -2441,7 +2441,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -2480,7 +2480,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* old_value = node->InputAt(2);
Node* new_value = node->InputAt(3);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -2521,7 +2521,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = int8_op;
} else if (type == MachineType::Uint8()) {
......
......@@ -1977,7 +1977,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -2012,7 +2012,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* old_value = node->InputAt(2);
Node* new_value = node->InputAt(3);
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8;
......@@ -2053,7 +2053,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
......
......@@ -2256,7 +2256,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
ArchOpcode opcode = kArchNop;
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) {
......@@ -2291,7 +2291,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* old_value = node->InputAt(2);
Node* new_value = node->InputAt(3);
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8;
......@@ -2339,7 +2339,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* index = node->InputAt(1);
Node* value = node->InputAt(2);
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
......
......@@ -2320,7 +2320,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
}
void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8;
......@@ -2340,7 +2340,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
}
void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Uint8()) {
opcode = kX64Word64AtomicExchangeUint8;
......@@ -2358,7 +2358,7 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
}
void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8;
......@@ -2378,7 +2378,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
}
void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Uint8()) {
opcode = kX64Word64AtomicCompareExchangeUint8;
......@@ -2398,7 +2398,7 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* node, ArchOpcode int8_op, ArchOpcode uint8_op, ArchOpcode int16_op,
ArchOpcode uint16_op, ArchOpcode word32_op) {
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Int8()) {
opcode = int8_op;
......@@ -2434,7 +2434,7 @@ VISIT_ATOMIC_BINOP(Xor)
void InstructionSelector::VisitWord64AtomicBinaryOperation(
Node* node, ArchOpcode uint8_op, ArchOpcode uint16_op, ArchOpcode uint32_op,
ArchOpcode word64_op) {
MachineType type = AtomicOpRepresentationOf(node->op());
MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop;
if (type == MachineType::Uint8()) {
opcode = uint8_op;
......
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