mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Mostly undo r123297, but move the default case in EvaluateAsPCRel to the top
of the switch block to appease GCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123317 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e45f2dfde6
commit
5f8a917b65
@ -129,7 +129,7 @@ public:
|
|||||||
SmallVectorImpl<MCFixup> &Fixups) const {
|
SmallVectorImpl<MCFixup> &Fixups) const {
|
||||||
ARM_AM::AMSubMode Mode = (ARM_AM::AMSubMode)MI.getOperand(OpIdx).getImm();
|
ARM_AM::AMSubMode Mode = (ARM_AM::AMSubMode)MI.getOperand(OpIdx).getImm();
|
||||||
switch (Mode) {
|
switch (Mode) {
|
||||||
default: llvm_unreachable("Unknown addressing sub-mode!");
|
default: assert(0 && "Unknown addressing sub-mode!");
|
||||||
case ARM_AM::da: return 0;
|
case ARM_AM::da: return 0;
|
||||||
case ARM_AM::ia: return 1;
|
case ARM_AM::ia: return 1;
|
||||||
case ARM_AM::db: return 2;
|
case ARM_AM::db: return 2;
|
||||||
@ -646,9 +646,9 @@ static const MCSymbolRefExpr *FindLHSymExpr(const MCExpr *E) {
|
|||||||
// but this is good enough for now.
|
// but this is good enough for now.
|
||||||
static bool EvaluateAsPCRel(const MCExpr *Expr) {
|
static bool EvaluateAsPCRel(const MCExpr *Expr) {
|
||||||
switch (Expr->getKind()) {
|
switch (Expr->getKind()) {
|
||||||
|
default: assert(0 && "Unexpected expression type");
|
||||||
case MCExpr::SymbolRef: return false;
|
case MCExpr::SymbolRef: return false;
|
||||||
case MCExpr::Binary: return true;
|
case MCExpr::Binary: return true;
|
||||||
default: llvm_unreachable("Unexpected expression type");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -669,7 +669,7 @@ getMovtImmOpValue(const MCInst &MI, unsigned OpIdx,
|
|||||||
const MCExpr *OrigExpr = MO.getExpr();
|
const MCExpr *OrigExpr = MO.getExpr();
|
||||||
MCFixupKind Kind;
|
MCFixupKind Kind;
|
||||||
switch (Expr->getKind()) {
|
switch (Expr->getKind()) {
|
||||||
default: llvm_unreachable("Unsupported ARMFixup");
|
default: assert(0 && "Unsupported ARMFixup");
|
||||||
case MCSymbolRefExpr::VK_ARM_HI16:
|
case MCSymbolRefExpr::VK_ARM_HI16:
|
||||||
Kind = MCFixupKind(ARM::fixup_arm_movt_hi16);
|
Kind = MCFixupKind(ARM::fixup_arm_movt_hi16);
|
||||||
if (EvaluateAsPCRel(OrigExpr))
|
if (EvaluateAsPCRel(OrigExpr))
|
||||||
|
Loading…
Reference in New Issue
Block a user