@@ -3032,7 +3032,7 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
3032
3032
return false ;
3033
3033
}
3034
3034
3035
- const MipsMCExpr *GotExpr = nullptr ;
3035
+ const MCSpecifierExpr *GotExpr = nullptr ;
3036
3036
const MCExpr *LoExpr = nullptr ;
3037
3037
if (ABI.IsN32 () || ABI.IsN64 ()) {
3038
3038
// The remaining cases are:
@@ -3097,10 +3097,8 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
3097
3097
return false ;
3098
3098
}
3099
3099
3100
- const MipsMCExpr *HiExpr =
3101
- MipsMCExpr::create (Mips::S_HI, SymExpr, getContext ());
3102
- const MipsMCExpr *LoExpr =
3103
- MipsMCExpr::create (Mips::S_LO, SymExpr, getContext ());
3100
+ const auto *HiExpr = MipsMCExpr::create (Mips::S_HI, SymExpr, getContext ());
3101
+ const auto *LoExpr = MipsMCExpr::create (Mips::S_LO, SymExpr, getContext ());
3104
3102
3105
3103
// This is the 64-bit symbol address expansion.
3106
3104
if (ABI.ArePtrs64bit () && isGP64bit ()) {
@@ -3111,9 +3109,9 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
3111
3109
// If it is not available we exit if the destination is the same as the
3112
3110
// source register.
3113
3111
3114
- const MipsMCExpr *HighestExpr =
3112
+ const auto *HighestExpr =
3115
3113
MipsMCExpr::create (Mips::S_HIGHEST, SymExpr, getContext ());
3116
- const MipsMCExpr *HigherExpr =
3114
+ const auto *HigherExpr =
3117
3115
MipsMCExpr::create (Mips::S_HIGHER, SymExpr, getContext ());
3118
3116
3119
3117
bool RdRegIsRsReg =
@@ -3312,8 +3310,7 @@ bool MipsAsmParser::emitPartialAddress(MipsTargetStreamer &TOut, SMLoc IDLoc,
3312
3310
3313
3311
if (IsPicEnabled) {
3314
3312
const MCExpr *GotSym = MCSymbolRefExpr::create (Sym, getContext ());
3315
- const MipsMCExpr *GotExpr =
3316
- MipsMCExpr::create (Mips::S_GOT, GotSym, getContext ());
3313
+ const auto *GotExpr = MipsMCExpr::create (Mips::S_GOT, GotSym, getContext ());
3317
3314
3318
3315
if (isABI_O32 () || isABI_N32 ()) {
3319
3316
TOut.emitRRX (Mips::LW, ATReg, GPReg, MCOperand::createExpr (GotExpr),
@@ -3324,8 +3321,7 @@ bool MipsAsmParser::emitPartialAddress(MipsTargetStreamer &TOut, SMLoc IDLoc,
3324
3321
}
3325
3322
} else { // !IsPicEnabled
3326
3323
const MCExpr *HiSym = MCSymbolRefExpr::create (Sym, getContext ());
3327
- const MipsMCExpr *HiExpr =
3328
- MipsMCExpr::create (Mips::S_HI, HiSym, getContext ());
3324
+ const auto *HiExpr = MipsMCExpr::create (Mips::S_HI, HiSym, getContext ());
3329
3325
3330
3326
// FIXME: This is technically correct but gives a different result to gas,
3331
3327
// but gas is incomplete there (it has a fixme noting it doesn't work with
@@ -3337,10 +3333,10 @@ bool MipsAsmParser::emitPartialAddress(MipsTargetStreamer &TOut, SMLoc IDLoc,
3337
3333
TOut.emitRX (Mips::LUi, ATReg, MCOperand::createExpr (HiExpr), IDLoc, STI);
3338
3334
} else { // isABI_N64()
3339
3335
const MCExpr *HighestSym = MCSymbolRefExpr::create (Sym, getContext ());
3340
- const MipsMCExpr *HighestExpr =
3336
+ const auto *HighestExpr =
3341
3337
MipsMCExpr::create (Mips::S_HIGHEST, HighestSym, getContext ());
3342
3338
const MCExpr *HigherSym = MCSymbolRefExpr::create (Sym, getContext ());
3343
- const MipsMCExpr *HigherExpr =
3339
+ const auto *HigherExpr =
3344
3340
MipsMCExpr::create (Mips::S_HIGHER, HigherSym, getContext ());
3345
3341
3346
3342
TOut.emitRX (Mips::LUi, ATReg, MCOperand::createExpr (HighestExpr), IDLoc,
@@ -3428,8 +3424,7 @@ bool MipsAsmParser::expandLoadSingleImmToFPR(MCInst &Inst, SMLoc IDLoc,
3428
3424
3429
3425
MCSymbol *Sym = getContext ().createTempSymbol ();
3430
3426
const MCExpr *LoSym = MCSymbolRefExpr::create (Sym, getContext ());
3431
- const MipsMCExpr *LoExpr =
3432
- MipsMCExpr::create (Mips::S_LO, LoSym, getContext ());
3427
+ const auto *LoExpr = MipsMCExpr::create (Mips::S_LO, LoSym, getContext ());
3433
3428
3434
3429
getStreamer ().switchSection (ReadOnlySection);
3435
3430
getStreamer ().emitLabel (Sym, IDLoc);
@@ -3479,8 +3474,7 @@ bool MipsAsmParser::expandLoadDoubleImmToGPR(MCInst &Inst, SMLoc IDLoc,
3479
3474
3480
3475
MCSymbol *Sym = getContext ().createTempSymbol ();
3481
3476
const MCExpr *LoSym = MCSymbolRefExpr::create (Sym, getContext ());
3482
- const MipsMCExpr *LoExpr =
3483
- MipsMCExpr::create (Mips::S_LO, LoSym, getContext ());
3477
+ const auto *LoExpr = MipsMCExpr::create (Mips::S_LO, LoSym, getContext ());
3484
3478
3485
3479
getStreamer ().switchSection (ReadOnlySection);
3486
3480
getStreamer ().emitLabel (Sym, IDLoc);
@@ -3560,8 +3554,7 @@ bool MipsAsmParser::expandLoadDoubleImmToFPR(MCInst &Inst, bool Is64FPU,
3560
3554
3561
3555
MCSymbol *Sym = getContext ().createTempSymbol ();
3562
3556
const MCExpr *LoSym = MCSymbolRefExpr::create (Sym, getContext ());
3563
- const MipsMCExpr *LoExpr =
3564
- MipsMCExpr::create (Mips::S_LO, LoSym, getContext ());
3557
+ const auto *LoExpr = MipsMCExpr::create (Mips::S_LO, LoSym, getContext ());
3565
3558
3566
3559
getStreamer ().switchSection (ReadOnlySection);
3567
3560
getStreamer ().emitLabel (Sym, IDLoc);
@@ -6353,7 +6346,7 @@ MCRegister MipsAsmParser::getReg(int RC, int RegNo) {
6353
6346
// e.g. "%lo foo", "(%lo(foo))", "%lo(foo)+1".
6354
6347
const MCExpr *MipsAsmParser::parseRelocExpr () {
6355
6348
auto getOp = [](StringRef Op) {
6356
- return StringSwitch<MipsMCExpr ::Specifier>(Op)
6349
+ return StringSwitch<Mips ::Specifier>(Op)
6357
6350
.Case (" call16" , Mips::S_GOT_CALL)
6358
6351
.Case (" call_hi" , Mips::S_CALL_HI16)
6359
6352
.Case (" call_lo" , Mips::S_CALL_LO16)
@@ -6384,7 +6377,7 @@ const MCExpr *MipsAsmParser::parseRelocExpr() {
6384
6377
MCAsmParser &Parser = getParser ();
6385
6378
StringRef Name;
6386
6379
const MCExpr *Res = nullptr ;
6387
- SmallVector<MipsMCExpr ::Specifier, 0 > Ops;
6380
+ SmallVector<Mips ::Specifier, 0 > Ops;
6388
6381
while (parseOptionalToken (AsmToken::Percent)) {
6389
6382
if (Parser.parseIdentifier (Name) ||
6390
6383
Parser.parseToken (AsmToken::LParen, " expected '('" ))
0 commit comments