Commit 193cfbf0 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[compiler,cleanup] Remove some redundant stuff

In particular: initial values of local ArchOpcode variables that
get overwritten anyways. Creating these variables uninitialized makes
that obvious.

Change-Id: Ia205b5397c60769a46bf28ed60b299ac652f4b28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2470557
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70526}
parent 718fbb89
...@@ -666,7 +666,6 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -666,7 +666,6 @@ void InstructionSelector::VisitStore(Node* node) {
case MachineRepresentation::kWord64: // Fall through. case MachineRepresentation::kWord64: // Fall through.
case MachineRepresentation::kNone: case MachineRepresentation::kNone:
UNREACHABLE(); UNREACHABLE();
return;
} }
ExternalReferenceMatcher m(base); ExternalReferenceMatcher m(base);
...@@ -2191,7 +2190,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) { ...@@ -2191,7 +2190,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
ArmOperandGenerator g(this); ArmOperandGenerator g(this);
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
Node* index = node->InputAt(1); Node* index = node->InputAt(1);
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = opcode =
...@@ -2217,7 +2216,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) { ...@@ -2217,7 +2216,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
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;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kWord32AtomicStoreWord8; opcode = kWord32AtomicStoreWord8;
...@@ -2247,7 +2246,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -2247,7 +2246,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
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;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
...@@ -2261,7 +2260,6 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -2261,7 +2260,6 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
opcode = kWord32AtomicExchangeWord32; opcode = kWord32AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
AddressingMode addressing_mode = kMode_Offset_RR; AddressingMode addressing_mode = kMode_Offset_RR;
...@@ -2283,7 +2281,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -2283,7 +2281,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* index = node->InputAt(1); Node* index = node->InputAt(1);
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;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
...@@ -2297,7 +2295,6 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -2297,7 +2295,6 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
opcode = kWord32AtomicCompareExchangeWord32; opcode = kWord32AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
AddressingMode addressing_mode = kMode_Offset_RR; AddressingMode addressing_mode = kMode_Offset_RR;
...@@ -2322,7 +2319,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2322,7 +2319,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
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;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = int8_op; opcode = int8_op;
...@@ -2336,7 +2333,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2336,7 +2333,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
opcode = word32_op; opcode = word32_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
AddressingMode addressing_mode = kMode_Offset_RR; AddressingMode addressing_mode = kMode_Offset_RR;
......
...@@ -1771,7 +1771,6 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { ...@@ -1771,7 +1771,6 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
return;
} }
EmitLoad(this, value, opcode, immediate_mode, rep, node); EmitLoad(this, value, opcode, immediate_mode, rep, node);
return; return;
...@@ -2974,7 +2973,7 @@ void InstructionSelector::VisitMemoryBarrier(Node* node) { ...@@ -2974,7 +2973,7 @@ void InstructionSelector::VisitMemoryBarrier(Node* node) {
void InstructionSelector::VisitWord32AtomicLoad(Node* node) { void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
LoadRepresentation load_rep = LoadRepresentationOf(node->op()); LoadRepresentation load_rep = LoadRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = opcode =
...@@ -2995,7 +2994,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) { ...@@ -2995,7 +2994,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
void InstructionSelector::VisitWord64AtomicLoad(Node* node) { void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
LoadRepresentation load_rep = LoadRepresentationOf(node->op()); LoadRepresentation load_rep = LoadRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kArm64Word64AtomicLoadUint8; opcode = kArm64Word64AtomicLoadUint8;
...@@ -3017,7 +3016,7 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) { ...@@ -3017,7 +3016,7 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
void InstructionSelector::VisitWord32AtomicStore(Node* node) { void InstructionSelector::VisitWord32AtomicStore(Node* node) {
MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); MachineRepresentation rep = AtomicStoreRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kWord32AtomicStoreWord8; opcode = kWord32AtomicStoreWord8;
...@@ -3036,7 +3035,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) { ...@@ -3036,7 +3035,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
void InstructionSelector::VisitWord64AtomicStore(Node* node) { void InstructionSelector::VisitWord64AtomicStore(Node* node) {
MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); MachineRepresentation rep = AtomicStoreRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kArm64Word64AtomicStoreWord8; opcode = kArm64Word64AtomicStoreWord8;
...@@ -3057,7 +3056,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) { ...@@ -3057,7 +3056,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
} }
void InstructionSelector::VisitWord32AtomicExchange(Node* node) { void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
...@@ -3071,13 +3070,12 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -3071,13 +3070,12 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
opcode = kWord32AtomicExchangeWord32; opcode = kWord32AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicExchange(Node* node) { void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kArm64Word64AtomicExchangeUint8; opcode = kArm64Word64AtomicExchangeUint8;
...@@ -3089,13 +3087,12 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) { ...@@ -3089,13 +3087,12 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
opcode = kArm64Word64AtomicExchangeUint64; opcode = kArm64Word64AtomicExchangeUint64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
...@@ -3109,13 +3106,12 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -3109,13 +3106,12 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
opcode = kWord32AtomicCompareExchangeWord32; opcode = kWord32AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kArm64Word64AtomicCompareExchangeUint8; opcode = kArm64Word64AtomicCompareExchangeUint8;
...@@ -3127,7 +3123,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { ...@@ -3127,7 +3123,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
opcode = kArm64Word64AtomicCompareExchangeUint64; opcode = kArm64Word64AtomicCompareExchangeUint64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
...@@ -3135,7 +3130,7 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { ...@@ -3135,7 +3130,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) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = int8_op; opcode = int8_op;
...@@ -3149,7 +3144,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -3149,7 +3144,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
opcode = word32_op; opcode = word32_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinop(this, node, opcode); VisitAtomicBinop(this, node, opcode);
} }
...@@ -3171,7 +3165,7 @@ VISIT_ATOMIC_BINOP(Xor) ...@@ -3171,7 +3165,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 uint64_op) { ArchOpcode uint64_op) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = uint8_op; opcode = uint8_op;
...@@ -3183,7 +3177,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation( ...@@ -3183,7 +3177,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation(
opcode = uint64_op; opcode = uint64_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinop(this, node, opcode); VisitAtomicBinop(this, node, opcode);
} }
......
...@@ -364,7 +364,7 @@ void InstructionSelector::VisitAbortCSAAssert(Node* node) { ...@@ -364,7 +364,7 @@ void InstructionSelector::VisitAbortCSAAssert(Node* node) {
void InstructionSelector::VisitLoadTransform(Node* node) { void InstructionSelector::VisitLoadTransform(Node* node) {
LoadTransformParameters params = LoadTransformParametersOf(node->op()); LoadTransformParameters params = LoadTransformParametersOf(node->op());
InstructionCode opcode = kArchNop; InstructionCode opcode;
switch (params.transformation) { switch (params.transformation) {
case LoadTransformation::kS128Load8Splat: case LoadTransformation::kS128Load8Splat:
opcode = kIA32S128Load8Splat; opcode = kIA32S128Load8Splat;
...@@ -419,7 +419,7 @@ void InstructionSelector::VisitLoadTransform(Node* node) { ...@@ -419,7 +419,7 @@ void InstructionSelector::VisitLoadTransform(Node* node) {
void InstructionSelector::VisitLoad(Node* node) { void InstructionSelector::VisitLoad(Node* node) {
LoadRepresentation load_rep = LoadRepresentationOf(node->op()); LoadRepresentation load_rep = LoadRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kIA32Movss; opcode = kIA32Movss;
...@@ -503,7 +503,7 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -503,7 +503,7 @@ void InstructionSelector::VisitStore(Node* node) {
code |= MiscField::encode(static_cast<int>(record_write_mode)); code |= MiscField::encode(static_cast<int>(record_write_mode));
Emit(code, 0, nullptr, arraysize(inputs), inputs, temp_count, temps); Emit(code, 0, nullptr, arraysize(inputs), inputs, temp_count, temps);
} else { } else {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kIA32Movss; opcode = kIA32Movss;
...@@ -532,7 +532,6 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -532,7 +532,6 @@ void InstructionSelector::VisitStore(Node* node) {
case MachineRepresentation::kWord64: // Fall through. case MachineRepresentation::kWord64: // Fall through.
case MachineRepresentation::kNone: case MachineRepresentation::kNone:
UNREACHABLE(); UNREACHABLE();
return;
} }
InstructionOperand val; InstructionOperand val;
...@@ -1818,7 +1817,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) { ...@@ -1818,7 +1817,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
void InstructionSelector::VisitWord32AtomicStore(Node* node) { void InstructionSelector::VisitWord32AtomicStore(Node* node) {
IA32OperandGenerator g(this); IA32OperandGenerator g(this);
MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); MachineRepresentation rep = AtomicStoreRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
...@@ -1838,7 +1837,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) { ...@@ -1838,7 +1837,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
void InstructionSelector::VisitWord32AtomicExchange(Node* node) { void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
IA32OperandGenerator g(this); IA32OperandGenerator g(this);
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
...@@ -1851,7 +1850,6 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -1851,7 +1850,6 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
opcode = kWord32AtomicExchangeWord32; opcode = kWord32AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode, type.representation()); VisitAtomicExchange(this, node, opcode, type.representation());
} }
...@@ -1864,7 +1862,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -1864,7 +1862,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* new_value = node->InputAt(3); Node* new_value = node->InputAt(3);
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
...@@ -1877,7 +1875,6 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -1877,7 +1875,6 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
opcode = kWord32AtomicCompareExchangeWord32; opcode = kWord32AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
AddressingMode addressing_mode; AddressingMode addressing_mode;
InstructionOperand new_val_operand = InstructionOperand new_val_operand =
...@@ -1896,7 +1893,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -1896,7 +1893,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) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = int8_op; opcode = int8_op;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
...@@ -1909,7 +1906,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -1909,7 +1906,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
opcode = word32_op; opcode = word32_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinOp(this, node, opcode, type.representation()); VisitAtomicBinOp(this, node, opcode, type.representation());
} }
......
...@@ -604,9 +604,8 @@ size_t InstructionSelector::AddOperandToStateValueDescriptor( ...@@ -604,9 +604,8 @@ size_t InstructionSelector::AddOperandToStateValueDescriptor(
values->PushArgumentsLength(); values->PushArgumentsLength();
return 0; return 0;
} }
case IrOpcode::kObjectState: { case IrOpcode::kObjectState:
UNREACHABLE(); UNREACHABLE();
}
case IrOpcode::kTypedObjectState: case IrOpcode::kTypedObjectState:
case IrOpcode::kObjectId: { case IrOpcode::kObjectId: {
size_t id = deduplicator->GetObjectId(input); size_t id = deduplicator->GetObjectId(input);
...@@ -2857,7 +2856,7 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) { ...@@ -2857,7 +2856,7 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
} }
// Select the appropriate opcode based on the call type. // Select the appropriate opcode based on the call type.
InstructionCode opcode = kArchNop; InstructionCode opcode;
switch (call_descriptor->kind()) { switch (call_descriptor->kind()) {
case CallDescriptor::kCallAddress: { case CallDescriptor::kCallAddress: {
int misc_field = static_cast<int>(call_descriptor->ParameterCount()); int misc_field = static_cast<int>(call_descriptor->ParameterCount());
...@@ -2940,7 +2939,6 @@ void InstructionSelector::VisitTailCall(Node* node) { ...@@ -2940,7 +2939,6 @@ void InstructionSelector::VisitTailCall(Node* node) {
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
return;
} }
int temps_count = GetTempsCountForTailCallFromJSFunction(); int temps_count = GetTempsCountForTailCallFromJSFunction();
for (int i = 0; i < temps_count; i++) { for (int i = 0; i < temps_count; i++) {
...@@ -2959,7 +2957,6 @@ void InstructionSelector::VisitTailCall(Node* node) { ...@@ -2959,7 +2957,6 @@ void InstructionSelector::VisitTailCall(Node* node) {
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
return;
} }
} }
opcode = EncodeCallDescriptorFlags(opcode, call_descriptor->flags()); opcode = EncodeCallDescriptorFlags(opcode, call_descriptor->flags());
......
...@@ -431,7 +431,7 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -431,7 +431,7 @@ void InstructionSelector::VisitStore(Node* node) {
code |= MiscField::encode(static_cast<int>(record_write_mode)); code |= MiscField::encode(static_cast<int>(record_write_mode));
Emit(code, 0, nullptr, input_count, inputs, temp_count, temps); Emit(code, 0, nullptr, input_count, inputs, temp_count, temps);
} else { } else {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kMipsSwc1; opcode = kMipsSwc1;
...@@ -460,7 +460,6 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -460,7 +460,6 @@ void InstructionSelector::VisitStore(Node* node) {
case MachineRepresentation::kWord64: // Fall through. case MachineRepresentation::kWord64: // Fall through.
case MachineRepresentation::kNone: case MachineRepresentation::kNone:
UNREACHABLE(); UNREACHABLE();
return;
} }
if (g.CanBeImmediate(index, opcode)) { if (g.CanBeImmediate(index, opcode)) {
...@@ -1386,7 +1385,7 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) { ...@@ -1386,7 +1385,7 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) {
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
Node* index = node->InputAt(1); Node* index = node->InputAt(1);
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = load_rep.IsUnsigned() ? kMipsLbu : kMipsLb; opcode = load_rep.IsUnsigned() ? kMipsLbu : kMipsLb;
...@@ -1439,7 +1438,7 @@ void InstructionSelector::VisitUnalignedStore(Node* node) { ...@@ -1439,7 +1438,7 @@ void InstructionSelector::VisitUnalignedStore(Node* node) {
UnalignedStoreRepresentation rep = UnalignedStoreRepresentationOf(node->op()); UnalignedStoreRepresentation rep = UnalignedStoreRepresentationOf(node->op());
// TODO(mips): I guess this could be done in a better way. // TODO(mips): I guess this could be done in a better way.
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kMipsUswc1; opcode = kMipsUswc1;
...@@ -1887,7 +1886,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) { ...@@ -1887,7 +1886,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
MipsOperandGenerator g(this); MipsOperandGenerator g(this);
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
Node* index = node->InputAt(1); Node* index = node->InputAt(1);
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = opcode =
...@@ -1923,7 +1922,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) { ...@@ -1923,7 +1922,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
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;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kWord32AtomicStoreWord8; opcode = kWord32AtomicStoreWord8;
...@@ -1957,7 +1956,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -1957,7 +1956,7 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
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;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
...@@ -1971,7 +1970,6 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -1971,7 +1970,6 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
opcode = kWord32AtomicExchangeWord32; opcode = kWord32AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
AddressingMode addressing_mode = kMode_MRI; AddressingMode addressing_mode = kMode_MRI;
...@@ -1996,7 +1994,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -1996,7 +1994,7 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
Node* index = node->InputAt(1); Node* index = node->InputAt(1);
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;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
...@@ -2010,7 +2008,6 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -2010,7 +2008,6 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
opcode = kWord32AtomicCompareExchangeWord32; opcode = kWord32AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
AddressingMode addressing_mode = kMode_MRI; AddressingMode addressing_mode = kMode_MRI;
...@@ -2037,7 +2034,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2037,7 +2034,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
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;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = int8_op; opcode = int8_op;
...@@ -2051,7 +2048,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2051,7 +2048,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
opcode = word32_op; opcode = word32_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
AddressingMode addressing_mode = kMode_MRI; AddressingMode addressing_mode = kMode_MRI;
......
...@@ -504,7 +504,7 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -504,7 +504,7 @@ void InstructionSelector::VisitStore(Node* node) {
code |= MiscField::encode(static_cast<int>(record_write_mode)); code |= MiscField::encode(static_cast<int>(record_write_mode));
Emit(code, 0, nullptr, input_count, inputs, temp_count, temps); Emit(code, 0, nullptr, input_count, inputs, temp_count, temps);
} else { } else {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kMips64Swc1; opcode = kMips64Swc1;
...@@ -535,7 +535,6 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -535,7 +535,6 @@ void InstructionSelector::VisitStore(Node* node) {
case MachineRepresentation::kCompressed: // Fall through. case MachineRepresentation::kCompressed: // Fall through.
case MachineRepresentation::kNone: case MachineRepresentation::kNone:
UNREACHABLE(); UNREACHABLE();
return;
} }
if (g.CanBeImmediate(index, opcode)) { if (g.CanBeImmediate(index, opcode)) {
...@@ -1389,7 +1388,6 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { ...@@ -1389,7 +1388,6 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
return;
} }
EmitLoad(this, value, opcode, node); EmitLoad(this, value, opcode, node);
} else { } else {
...@@ -1746,7 +1744,7 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) { ...@@ -1746,7 +1744,7 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) {
Node* base = node->InputAt(0); Node* base = node->InputAt(0);
Node* index = node->InputAt(1); Node* index = node->InputAt(1);
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kMips64Ulwc1; opcode = kMips64Ulwc1;
...@@ -1799,7 +1797,7 @@ void InstructionSelector::VisitUnalignedStore(Node* node) { ...@@ -1799,7 +1797,7 @@ void InstructionSelector::VisitUnalignedStore(Node* node) {
Node* value = node->InputAt(2); Node* value = node->InputAt(2);
UnalignedStoreRepresentation rep = UnalignedStoreRepresentationOf(node->op()); UnalignedStoreRepresentation rep = UnalignedStoreRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kMips64Uswc1; opcode = kMips64Uswc1;
...@@ -2532,7 +2530,7 @@ void InstructionSelector::VisitMemoryBarrier(Node* node) { ...@@ -2532,7 +2530,7 @@ void InstructionSelector::VisitMemoryBarrier(Node* node) {
void InstructionSelector::VisitWord32AtomicLoad(Node* node) { void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
LoadRepresentation load_rep = LoadRepresentationOf(node->op()); LoadRepresentation load_rep = LoadRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = opcode =
...@@ -2553,7 +2551,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) { ...@@ -2553,7 +2551,7 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
void InstructionSelector::VisitWord32AtomicStore(Node* node) { void InstructionSelector::VisitWord32AtomicStore(Node* node) {
MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); MachineRepresentation rep = AtomicStoreRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kWord32AtomicStoreWord8; opcode = kWord32AtomicStoreWord8;
...@@ -2573,7 +2571,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) { ...@@ -2573,7 +2571,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
void InstructionSelector::VisitWord64AtomicLoad(Node* node) { void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
LoadRepresentation load_rep = LoadRepresentationOf(node->op()); LoadRepresentation load_rep = LoadRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kMips64Word64AtomicLoadUint8; opcode = kMips64Word64AtomicLoadUint8;
...@@ -2595,7 +2593,7 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) { ...@@ -2595,7 +2593,7 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
void InstructionSelector::VisitWord64AtomicStore(Node* node) { void InstructionSelector::VisitWord64AtomicStore(Node* node) {
MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); MachineRepresentation rep = AtomicStoreRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kMips64Word64AtomicStoreWord8; opcode = kMips64Word64AtomicStoreWord8;
...@@ -2617,7 +2615,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) { ...@@ -2617,7 +2615,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
} }
void InstructionSelector::VisitWord32AtomicExchange(Node* node) { void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
...@@ -2631,14 +2629,13 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -2631,14 +2629,13 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
opcode = kWord32AtomicExchangeWord32; opcode = kWord32AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicExchange(Node* node) { void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kMips64Word64AtomicExchangeUint8; opcode = kMips64Word64AtomicExchangeUint8;
...@@ -2650,13 +2647,12 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) { ...@@ -2650,13 +2647,12 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
opcode = kMips64Word64AtomicExchangeUint64; opcode = kMips64Word64AtomicExchangeUint64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
...@@ -2670,14 +2666,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -2670,14 +2666,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
opcode = kWord32AtomicCompareExchangeWord32; opcode = kWord32AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kMips64Word64AtomicCompareExchangeUint8; opcode = kMips64Word64AtomicCompareExchangeUint8;
...@@ -2689,14 +2684,13 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { ...@@ -2689,14 +2684,13 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
opcode = kMips64Word64AtomicCompareExchangeUint64; opcode = kMips64Word64AtomicCompareExchangeUint64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
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) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = int8_op; opcode = int8_op;
...@@ -2710,7 +2704,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2710,7 +2704,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
opcode = word32_op; opcode = word32_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinop(this, node, opcode); VisitAtomicBinop(this, node, opcode);
...@@ -2733,7 +2726,7 @@ VISIT_ATOMIC_BINOP(Xor) ...@@ -2733,7 +2726,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 uint64_op) { ArchOpcode uint64_op) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = uint8_op; opcode = uint8_op;
...@@ -2745,7 +2738,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation( ...@@ -2745,7 +2738,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation(
opcode = uint64_op; opcode = uint64_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinop(this, node, opcode); VisitAtomicBinop(this, node, opcode);
} }
......
...@@ -314,7 +314,7 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -314,7 +314,7 @@ void InstructionSelector::VisitStore(Node* node) {
CHECK_EQ(is_atomic, false); CHECK_EQ(is_atomic, false);
Emit(code, 0, nullptr, input_count, inputs, temp_count, temps); Emit(code, 0, nullptr, input_count, inputs, temp_count, temps);
} else { } else {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
ImmediateMode mode = kInt16Imm; ImmediateMode mode = kInt16Imm;
switch (rep) { switch (rep) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
...@@ -359,7 +359,6 @@ void InstructionSelector::VisitStore(Node* node) { ...@@ -359,7 +359,6 @@ void InstructionSelector::VisitStore(Node* node) {
break; break;
case MachineRepresentation::kNone: case MachineRepresentation::kNone:
UNREACHABLE(); UNREACHABLE();
return;
} }
if (g.CanBeImmediate(offset, mode)) { if (g.CanBeImmediate(offset, mode)) {
...@@ -1951,7 +1950,7 @@ void VisitAtomicExchange(InstructionSelector* selector, Node* node, ...@@ -1951,7 +1950,7 @@ void VisitAtomicExchange(InstructionSelector* selector, Node* node,
} }
void InstructionSelector::VisitWord32AtomicExchange(Node* node) { void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
...@@ -1965,13 +1964,12 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -1965,13 +1964,12 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
opcode = kPPC_AtomicExchangeWord32; opcode = kPPC_AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicExchange(Node* node) { void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kPPC_AtomicExchangeUint8; opcode = kPPC_AtomicExchangeUint8;
...@@ -1983,7 +1981,6 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) { ...@@ -1983,7 +1981,6 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
opcode = kPPC_AtomicExchangeWord64; opcode = kPPC_AtomicExchangeWord64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
...@@ -2015,7 +2012,7 @@ void VisitAtomicCompareExchange(InstructionSelector* selector, Node* node, ...@@ -2015,7 +2012,7 @@ void VisitAtomicCompareExchange(InstructionSelector* selector, Node* node,
void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
...@@ -2028,14 +2025,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -2028,14 +2025,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
opcode = kPPC_AtomicCompareExchangeWord32; opcode = kPPC_AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kPPC_AtomicCompareExchangeUint8; opcode = kPPC_AtomicCompareExchangeUint8;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
...@@ -2046,7 +2042,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { ...@@ -2046,7 +2042,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
opcode = kPPC_AtomicCompareExchangeWord64; opcode = kPPC_AtomicCompareExchangeWord64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
...@@ -2062,7 +2057,7 @@ void VisitAtomicBinaryOperation(InstructionSelector* selector, Node* node, ...@@ -2062,7 +2057,7 @@ void VisitAtomicBinaryOperation(InstructionSelector* selector, Node* node,
Node* value = node->InputAt(2); Node* value = node->InputAt(2);
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = int8_op; opcode = int8_op;
...@@ -2082,7 +2077,6 @@ void VisitAtomicBinaryOperation(InstructionSelector* selector, Node* node, ...@@ -2082,7 +2077,6 @@ void VisitAtomicBinaryOperation(InstructionSelector* selector, Node* node,
opcode = uint64_op; opcode = uint64_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
AddressingMode addressing_mode = kMode_MRR; AddressingMode addressing_mode = kMode_MRR;
......
...@@ -272,7 +272,7 @@ bool S390OpcodeOnlySupport12BitDisp(InstructionCode op) { ...@@ -272,7 +272,7 @@ bool S390OpcodeOnlySupport12BitDisp(InstructionCode op) {
ArchOpcode SelectLoadOpcode(Node* node) { ArchOpcode SelectLoadOpcode(Node* node) {
LoadRepresentation load_rep = LoadRepresentationOf(node->op()); LoadRepresentation load_rep = LoadRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kS390_LoadFloat32; opcode = kS390_LoadFloat32;
...@@ -747,7 +747,7 @@ static void VisitGeneralStore( ...@@ -747,7 +747,7 @@ static void VisitGeneralStore(
code |= MiscField::encode(static_cast<int>(record_write_mode)); code |= MiscField::encode(static_cast<int>(record_write_mode));
selector->Emit(code, 0, nullptr, input_count, inputs, temp_count, temps); selector->Emit(code, 0, nullptr, input_count, inputs, temp_count, temps);
} else { } else {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
NodeMatcher m(value); NodeMatcher m(value);
switch (rep) { switch (rep) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
...@@ -799,7 +799,6 @@ static void VisitGeneralStore( ...@@ -799,7 +799,6 @@ static void VisitGeneralStore(
break; break;
case MachineRepresentation::kNone: case MachineRepresentation::kNone:
UNREACHABLE(); UNREACHABLE();
return;
} }
InstructionOperand inputs[4]; InstructionOperand inputs[4];
size_t input_count = 0; size_t input_count = 0;
...@@ -2302,7 +2301,7 @@ void VisitAtomicExchange(InstructionSelector* selector, Node* node, ...@@ -2302,7 +2301,7 @@ void VisitAtomicExchange(InstructionSelector* selector, Node* node,
} }
void InstructionSelector::VisitWord32AtomicExchange(Node* node) { void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
...@@ -2316,13 +2315,12 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -2316,13 +2315,12 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
opcode = kWord32AtomicExchangeWord32; opcode = kWord32AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicExchange(Node* node) { void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kS390_Word64AtomicExchangeUint8; opcode = kS390_Word64AtomicExchangeUint8;
...@@ -2334,7 +2332,6 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) { ...@@ -2334,7 +2332,6 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
opcode = kS390_Word64AtomicExchangeUint64; opcode = kS390_Word64AtomicExchangeUint64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
...@@ -2372,7 +2369,7 @@ void VisitAtomicCompareExchange(InstructionSelector* selector, Node* node, ...@@ -2372,7 +2369,7 @@ void VisitAtomicCompareExchange(InstructionSelector* selector, Node* node,
void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
...@@ -2385,14 +2382,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -2385,14 +2382,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
opcode = kWord32AtomicCompareExchangeWord32; opcode = kWord32AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kS390_Word64AtomicCompareExchangeUint8; opcode = kS390_Word64AtomicCompareExchangeUint8;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
...@@ -2403,7 +2399,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { ...@@ -2403,7 +2399,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
opcode = kS390_Word64AtomicCompareExchangeUint64; opcode = kS390_Word64AtomicCompareExchangeUint64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
...@@ -2447,7 +2442,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2447,7 +2442,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) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = int8_op; opcode = int8_op;
...@@ -2461,7 +2456,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2461,7 +2456,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
opcode = word32_op; opcode = word32_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinop(this, node, opcode); VisitAtomicBinop(this, node, opcode);
} }
...@@ -2484,7 +2478,7 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation( ...@@ -2484,7 +2478,7 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation(
Node* node, ArchOpcode uint8_op, ArchOpcode uint16_op, ArchOpcode word32_op, Node* node, ArchOpcode uint8_op, ArchOpcode uint16_op, ArchOpcode word32_op,
ArchOpcode word64_op) { ArchOpcode word64_op) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = uint8_op; opcode = uint8_op;
...@@ -2496,7 +2490,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation( ...@@ -2496,7 +2490,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation(
opcode = word64_op; opcode = word64_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinop(this, node, opcode); VisitAtomicBinop(this, node, opcode);
} }
......
...@@ -241,7 +241,7 @@ class X64OperandGenerator final : public OperandGenerator { ...@@ -241,7 +241,7 @@ class X64OperandGenerator final : public OperandGenerator {
namespace { namespace {
ArchOpcode GetLoadOpcode(LoadRepresentation load_rep) { ArchOpcode GetLoadOpcode(LoadRepresentation load_rep) {
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (load_rep.representation()) { switch (load_rep.representation()) {
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
opcode = kX64Movss; opcode = kX64Movss;
...@@ -386,7 +386,7 @@ void InstructionSelector::VisitLoadLane(Node* node) { ...@@ -386,7 +386,7 @@ void InstructionSelector::VisitLoadLane(Node* node) {
void InstructionSelector::VisitLoadTransform(Node* node) { void InstructionSelector::VisitLoadTransform(Node* node) {
LoadTransformParameters params = LoadTransformParametersOf(node->op()); LoadTransformParameters params = LoadTransformParametersOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (params.transformation) { switch (params.transformation) {
case LoadTransformation::kS128Load8Splat: case LoadTransformation::kS128Load8Splat:
opcode = kX64S128Load8Splat; opcode = kX64S128Load8Splat;
...@@ -687,7 +687,7 @@ bool TryMergeTruncateInt64ToInt32IntoLoad(InstructionSelector* selector, ...@@ -687,7 +687,7 @@ bool TryMergeTruncateInt64ToInt32IntoLoad(InstructionSelector* selector,
if (load->opcode() == IrOpcode::kLoad && selector->CanCover(node, load)) { if (load->opcode() == IrOpcode::kLoad && selector->CanCover(node, load)) {
LoadRepresentation load_rep = LoadRepresentationOf(load->op()); LoadRepresentation load_rep = LoadRepresentationOf(load->op());
MachineRepresentation rep = load_rep.representation(); MachineRepresentation rep = load_rep.representation();
InstructionCode opcode = kArchNop; InstructionCode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kBit: // Fall through. case MachineRepresentation::kBit: // Fall through.
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
...@@ -1321,7 +1321,7 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { ...@@ -1321,7 +1321,7 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
if (value->opcode() == IrOpcode::kLoad && CanCover(node, value)) { if (value->opcode() == IrOpcode::kLoad && CanCover(node, value)) {
LoadRepresentation load_rep = LoadRepresentationOf(value->op()); LoadRepresentation load_rep = LoadRepresentationOf(value->op());
MachineRepresentation rep = load_rep.representation(); MachineRepresentation rep = load_rep.representation();
InstructionCode opcode = kArchNop; InstructionCode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kBit: // Fall through. case MachineRepresentation::kBit: // Fall through.
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
...@@ -1335,7 +1335,6 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { ...@@ -1335,7 +1335,6 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
return;
} }
InstructionOperand outputs[] = {g.DefineAsRegister(node)}; InstructionOperand outputs[] = {g.DefineAsRegister(node)};
size_t input_count = 0; size_t input_count = 0;
...@@ -2584,7 +2583,7 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) { ...@@ -2584,7 +2583,7 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
void InstructionSelector::VisitWord32AtomicStore(Node* node) { void InstructionSelector::VisitWord32AtomicStore(Node* node) {
MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); MachineRepresentation rep = AtomicStoreRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
...@@ -2603,7 +2602,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) { ...@@ -2603,7 +2602,7 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
void InstructionSelector::VisitWord64AtomicStore(Node* node) { void InstructionSelector::VisitWord64AtomicStore(Node* node) {
MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); MachineRepresentation rep = AtomicStoreRepresentationOf(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
switch (rep) { switch (rep) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
opcode = kX64Word64AtomicExchangeUint8; opcode = kX64Word64AtomicExchangeUint8;
...@@ -2625,7 +2624,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) { ...@@ -2625,7 +2624,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
void InstructionSelector::VisitWord32AtomicExchange(Node* node) { void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicExchangeInt8; opcode = kWord32AtomicExchangeInt8;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
...@@ -2638,14 +2637,13 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) { ...@@ -2638,14 +2637,13 @@ void InstructionSelector::VisitWord32AtomicExchange(Node* node) {
opcode = kWord32AtomicExchangeWord32; opcode = kWord32AtomicExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicExchange(Node* node) { void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kX64Word64AtomicExchangeUint8; opcode = kX64Word64AtomicExchangeUint8;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
...@@ -2656,14 +2654,13 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) { ...@@ -2656,14 +2654,13 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
opcode = kX64Word64AtomicExchangeUint64; opcode = kX64Word64AtomicExchangeUint64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicExchange(this, node, opcode); VisitAtomicExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = kWord32AtomicCompareExchangeInt8; opcode = kWord32AtomicCompareExchangeInt8;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
...@@ -2676,14 +2673,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) { ...@@ -2676,14 +2673,13 @@ void InstructionSelector::VisitWord32AtomicCompareExchange(Node* node) {
opcode = kWord32AtomicCompareExchangeWord32; opcode = kWord32AtomicCompareExchangeWord32;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = kX64Word64AtomicCompareExchangeUint8; opcode = kX64Word64AtomicCompareExchangeUint8;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
...@@ -2694,7 +2690,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { ...@@ -2694,7 +2690,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
opcode = kX64Word64AtomicCompareExchangeUint64; opcode = kX64Word64AtomicCompareExchangeUint64;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicCompareExchange(this, node, opcode); VisitAtomicCompareExchange(this, node, opcode);
} }
...@@ -2703,7 +2698,7 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2703,7 +2698,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) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Int8()) { if (type == MachineType::Int8()) {
opcode = int8_op; opcode = int8_op;
} else if (type == MachineType::Uint8()) { } else if (type == MachineType::Uint8()) {
...@@ -2716,7 +2711,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation( ...@@ -2716,7 +2711,6 @@ void InstructionSelector::VisitWord32AtomicBinaryOperation(
opcode = word32_op; opcode = word32_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinop(this, node, opcode); VisitAtomicBinop(this, node, opcode);
} }
...@@ -2739,7 +2733,7 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation( ...@@ -2739,7 +2733,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 word64_op) { ArchOpcode word64_op) {
MachineType type = AtomicOpType(node->op()); MachineType type = AtomicOpType(node->op());
ArchOpcode opcode = kArchNop; ArchOpcode opcode;
if (type == MachineType::Uint8()) { if (type == MachineType::Uint8()) {
opcode = uint8_op; opcode = uint8_op;
} else if (type == MachineType::Uint16()) { } else if (type == MachineType::Uint16()) {
...@@ -2750,7 +2744,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation( ...@@ -2750,7 +2744,6 @@ void InstructionSelector::VisitWord64AtomicBinaryOperation(
opcode = word64_op; opcode = word64_op;
} else { } else {
UNREACHABLE(); UNREACHABLE();
return;
} }
VisitAtomicBinop(this, node, opcode); VisitAtomicBinop(this, node, opcode);
} }
......
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