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