Commit 081e46d9 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: Fix -Wunreachable-code-aggressive warnings in arm and arm64 code

Port 67113424

Original Commit Message:

    Like https://chromium-review.googlesource.com/c/v8/v8/+/2994804, but
    for arm and arm64.

R=thakis@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I4fbc42c48db2c43e55279ab40681c0735106d454
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3129640Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76577}
parent 7d0a5623
......@@ -303,7 +303,6 @@ Condition Assembler::GetCondition(Instr instr) {
default:
UNIMPLEMENTED();
}
return al;
}
bool Assembler::IsLis(Instr instr) {
......
......@@ -440,7 +440,6 @@ Condition Assembler::GetCondition(Instr instr) {
default:
UNIMPLEMENTED();
}
return al;
}
#if V8_TARGET_ARCH_S390X
......
......@@ -1184,7 +1184,6 @@ void TurboAssembler::ConvertFloat32ToInt64(const Register dst,
break;
case kRoundToNearest:
UNIMPLEMENTED();
break;
case kRoundToPlusInf:
m = Condition(6);
break;
......@@ -1193,7 +1192,6 @@ void TurboAssembler::ConvertFloat32ToInt64(const Register dst,
break;
default:
UNIMPLEMENTED();
break;
}
cgebr(m, dst, double_input);
}
......@@ -1208,7 +1206,6 @@ void TurboAssembler::ConvertDoubleToInt64(const Register dst,
break;
case kRoundToNearest:
UNIMPLEMENTED();
break;
case kRoundToPlusInf:
m = Condition(6);
break;
......@@ -1217,7 +1214,6 @@ void TurboAssembler::ConvertDoubleToInt64(const Register dst,
break;
default:
UNIMPLEMENTED();
break;
}
cgdbr(m, dst, double_input);
}
......@@ -1241,7 +1237,6 @@ void TurboAssembler::ConvertDoubleToInt32(const Register dst,
break;
default:
UNIMPLEMENTED();
break;
}
#ifdef V8_TARGET_ARCH_S390X
lghi(dst, Operand::Zero());
......@@ -1268,7 +1263,6 @@ void TurboAssembler::ConvertFloat32ToInt32(const Register result,
break;
default:
UNIMPLEMENTED();
break;
}
#ifdef V8_TARGET_ARCH_S390X
lghi(result, Operand::Zero());
......@@ -1286,7 +1280,6 @@ void TurboAssembler::ConvertFloat32ToUnsignedInt32(
break;
case kRoundToNearest:
UNIMPLEMENTED();
break;
case kRoundToPlusInf:
m = Condition(6);
break;
......@@ -1295,7 +1288,6 @@ void TurboAssembler::ConvertFloat32ToUnsignedInt32(
break;
default:
UNIMPLEMENTED();
break;
}
#ifdef V8_TARGET_ARCH_S390X
lghi(result, Operand::Zero());
......@@ -1313,7 +1305,6 @@ void TurboAssembler::ConvertFloat32ToUnsignedInt64(
break;
case kRoundToNearest:
UNIMPLEMENTED();
break;
case kRoundToPlusInf:
m = Condition(6);
break;
......@@ -1322,7 +1313,6 @@ void TurboAssembler::ConvertFloat32ToUnsignedInt64(
break;
default:
UNIMPLEMENTED();
break;
}
clgebr(m, Condition(0), result, double_input);
}
......@@ -1337,7 +1327,6 @@ void TurboAssembler::ConvertDoubleToUnsignedInt64(
break;
case kRoundToNearest:
UNIMPLEMENTED();
break;
case kRoundToPlusInf:
m = Condition(6);
break;
......@@ -1346,7 +1335,6 @@ void TurboAssembler::ConvertDoubleToUnsignedInt64(
break;
default:
UNIMPLEMENTED();
break;
}
clgdbr(m, Condition(0), dst, double_input);
}
......@@ -1361,7 +1349,6 @@ void TurboAssembler::ConvertDoubleToUnsignedInt32(
break;
case kRoundToNearest:
UNIMPLEMENTED();
break;
case kRoundToPlusInf:
m = Condition(6);
break;
......@@ -1370,7 +1357,6 @@ void TurboAssembler::ConvertDoubleToUnsignedInt32(
break;
default:
UNIMPLEMENTED();
break;
}
#ifdef V8_TARGET_ARCH_S390X
lghi(dst, Operand::Zero());
......
......@@ -3884,7 +3884,6 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr,
break;
default:
UNREACHABLE();
break;
}
} else {
if (reg_value != 0) __ li(reg, Operand::Zero());
......@@ -4296,7 +4295,6 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
}
case Constant::kRpoNumber:
UNREACHABLE(); // TODO(dcarney): loading RPO constants on PPC.
break;
}
if (destination->IsStackSlot()) {
__ StoreU64(dst, g.ToMemOperand(destination), r0);
......
......@@ -343,7 +343,6 @@ void VisitStoreCommon(InstructionSelector* selector, Node* node,
break;
#else
UNREACHABLE();
break;
#endif
case MachineRepresentation::kTaggedSigned: // Fall through.
case MachineRepresentation::kTaggedPointer: // Fall through.
......
......@@ -3963,7 +3963,6 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
}
case Constant::kRpoNumber:
UNREACHABLE(); // TODO(dcarney): loading RPO constants on S390.
break;
}
if (destination->IsStackSlot()) {
__ StoreU64(dst, g.ToMemOperand(destination), r0);
......
......@@ -106,7 +106,6 @@ class S390OperandGenerator final : public OperandGenerator {
return OpParameter<int64_t>(node->op());
else
UNIMPLEMENTED();
return 0L;
}
bool CanBeImmediate(Node* node, OperandModes mode) {
......
......@@ -32,7 +32,6 @@ int EhFrameWriter::RegisterToDwarfCode(Register name) {
return kR0DwarfCode;
default:
UNIMPLEMENTED();
return -1;
}
}
......@@ -47,7 +46,6 @@ const char* EhFrameDisassembler::DwarfRegisterCodeToString(int code) {
return "sp";
default:
UNIMPLEMENTED();
return nullptr;
}
}
......
......@@ -38,7 +38,6 @@ int EhFrameWriter::RegisterToDwarfCode(Register name) {
return kR0DwarfCode;
default:
UNIMPLEMENTED();
return -1;
}
}
......@@ -55,7 +54,6 @@ const char* EhFrameDisassembler::DwarfRegisterCodeToString(int code) {
return "sp";
default:
UNIMPLEMENTED();
return nullptr;
}
}
......
......@@ -93,16 +93,12 @@ bool PPCDebugger::GetValue(const char* desc, intptr_t* value) {
if (regnum != kNoRegister) {
*value = GetRegisterValue(regnum);
return true;
} else {
if (strncmp(desc, "0x", 2) == 0) {
return SScanF(desc + 2, "%" V8PRIxPTR,
reinterpret_cast<uintptr_t*>(value)) == 1;
} else {
return SScanF(desc, "%" V8PRIuPTR, reinterpret_cast<uintptr_t*>(value)) ==
1;
}
}
return false;
if (strncmp(desc, "0x", 2) == 0) {
return SScanF(desc + 2, "%" V8PRIxPTR,
reinterpret_cast<uintptr_t*>(value)) == 1;
}
return SScanF(desc, "%" V8PRIuPTR, reinterpret_cast<uintptr_t*>(value)) == 1;
}
bool PPCDebugger::GetFPDoubleValue(const char* desc, double* value) {
......@@ -1031,7 +1027,6 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
break;
default:
UNREACHABLE();
break;
}
if (!stack_aligned) {
PrintF(" with unaligned stack %08" V8PRIxPTR "\n",
......@@ -1071,7 +1066,6 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
}
default:
UNREACHABLE();
break;
}
if (::v8::internal::FLAG_trace_sim || !stack_aligned) {
switch (redirection->type()) {
......@@ -1085,7 +1079,6 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
break;
default:
UNREACHABLE();
break;
}
}
} else if (redirection->type() == ExternalReference::DIRECT_API_CALL) {
......@@ -1704,7 +1697,6 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
case CRORC:
case CROR: {
UNIMPLEMENTED(); // Not used by V8.
break;
}
case RLWIMIX: {
int ra = instr->RAValue();
......@@ -3192,7 +3184,6 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
case LMW:
case STMW: {
UNIMPLEMENTED();
break;
}
case LFSU:
......@@ -3530,7 +3521,6 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
break;
default:
UNIMPLEMENTED(); // Not used by V8.
break;
}
if (frb_val < static_cast<double>(kMinVal)) {
frt_val = kMinVal;
......@@ -3575,7 +3565,6 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
break;
default:
UNIMPLEMENTED(); // Not used by V8.
break;
}
if (frb_val < static_cast<double>(kMinVal)) {
frt_val = kMinVal;
......@@ -3627,7 +3616,6 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
}
default:
UNIMPLEMENTED(); // Not used by V8.
break;
}
if (frb_val < kMinVal) {
frt_val = kMinVal;
......@@ -3671,7 +3659,6 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
break;
default:
UNIMPLEMENTED(); // Not used by V8.
break;
}
if (frb_val < kMinVal) {
frt_val = kMinVal;
......@@ -3764,7 +3751,6 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
break;
default:
UNIMPLEMENTED();
break;
}
return;
}
......@@ -5166,7 +5152,6 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
#undef GET_ADDRESS
default: {
UNIMPLEMENTED();
break;
}
}
}
......
......@@ -109,7 +109,6 @@ bool S390Debugger::GetValue(const char* desc, intptr_t* value) {
1;
}
}
return false;
}
bool S390Debugger::GetFPDoubleValue(const char* desc, double* value) {
......@@ -2037,7 +2036,6 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
break;
default:
UNREACHABLE();
break;
}
if (!stack_aligned) {
PrintF(" with unaligned stack %08" V8PRIxPTR "\n",
......@@ -2077,7 +2075,6 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
}
default:
UNREACHABLE();
break;
}
if (::v8::internal::FLAG_trace_sim || !stack_aligned) {
switch (redirection->type()) {
......@@ -2091,7 +2088,6 @@ void Simulator::SoftwareInterrupt(Instruction* instr) {
break;
default:
UNREACHABLE();
break;
}
}
} else if (redirection->type() == ExternalReference::DIRECT_API_CALL) {
......
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