@@ -3032,7 +3032,7 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
30323032 return false ;
30333033 }
30343034
3035- const MipsMCExpr *GotExpr = nullptr ;
3035+ const MCSpecifierExpr *GotExpr = nullptr ;
30363036 const MCExpr *LoExpr = nullptr ;
30373037 if (ABI.IsN32 () || ABI.IsN64 ()) {
30383038 // The remaining cases are:
@@ -3097,10 +3097,8 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
30973097 return false ;
30983098 }
30993099
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 ());
31043102
31053103 // This is the 64-bit symbol address expansion.
31063104 if (ABI.ArePtrs64bit () && isGP64bit ()) {
@@ -3111,9 +3109,9 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
31113109 // If it is not available we exit if the destination is the same as the
31123110 // source register.
31133111
3114- const MipsMCExpr *HighestExpr =
3112+ const auto *HighestExpr =
31153113 MipsMCExpr::create (Mips::S_HIGHEST, SymExpr, getContext ());
3116- const MipsMCExpr *HigherExpr =
3114+ const auto *HigherExpr =
31173115 MipsMCExpr::create (Mips::S_HIGHER, SymExpr, getContext ());
31183116
31193117 bool RdRegIsRsReg =
@@ -3312,8 +3310,7 @@ bool MipsAsmParser::emitPartialAddress(MipsTargetStreamer &TOut, SMLoc IDLoc,
33123310
33133311 if (IsPicEnabled) {
33143312 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 ());
33173314
33183315 if (isABI_O32 () || isABI_N32 ()) {
33193316 TOut.emitRRX (Mips::LW, ATReg, GPReg, MCOperand::createExpr (GotExpr),
@@ -3324,8 +3321,7 @@ bool MipsAsmParser::emitPartialAddress(MipsTargetStreamer &TOut, SMLoc IDLoc,
33243321 }
33253322 } else { // !IsPicEnabled
33263323 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 ());
33293325
33303326 // FIXME: This is technically correct but gives a different result to gas,
33313327 // 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,
33373333 TOut.emitRX (Mips::LUi, ATReg, MCOperand::createExpr (HiExpr), IDLoc, STI);
33383334 } else { // isABI_N64()
33393335 const MCExpr *HighestSym = MCSymbolRefExpr::create (Sym, getContext ());
3340- const MipsMCExpr *HighestExpr =
3336+ const auto *HighestExpr =
33413337 MipsMCExpr::create (Mips::S_HIGHEST, HighestSym, getContext ());
33423338 const MCExpr *HigherSym = MCSymbolRefExpr::create (Sym, getContext ());
3343- const MipsMCExpr *HigherExpr =
3339+ const auto *HigherExpr =
33443340 MipsMCExpr::create (Mips::S_HIGHER, HigherSym, getContext ());
33453341
33463342 TOut.emitRX (Mips::LUi, ATReg, MCOperand::createExpr (HighestExpr), IDLoc,
@@ -3428,8 +3424,7 @@ bool MipsAsmParser::expandLoadSingleImmToFPR(MCInst &Inst, SMLoc IDLoc,
34283424
34293425 MCSymbol *Sym = getContext ().createTempSymbol ();
34303426 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 ());
34333428
34343429 getStreamer ().switchSection (ReadOnlySection);
34353430 getStreamer ().emitLabel (Sym, IDLoc);
@@ -3479,8 +3474,7 @@ bool MipsAsmParser::expandLoadDoubleImmToGPR(MCInst &Inst, SMLoc IDLoc,
34793474
34803475 MCSymbol *Sym = getContext ().createTempSymbol ();
34813476 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 ());
34843478
34853479 getStreamer ().switchSection (ReadOnlySection);
34863480 getStreamer ().emitLabel (Sym, IDLoc);
@@ -3560,8 +3554,7 @@ bool MipsAsmParser::expandLoadDoubleImmToFPR(MCInst &Inst, bool Is64FPU,
35603554
35613555 MCSymbol *Sym = getContext ().createTempSymbol ();
35623556 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 ());
35653558
35663559 getStreamer ().switchSection (ReadOnlySection);
35673560 getStreamer ().emitLabel (Sym, IDLoc);
@@ -6353,7 +6346,7 @@ MCRegister MipsAsmParser::getReg(int RC, int RegNo) {
63536346// e.g. "%lo foo", "(%lo(foo))", "%lo(foo)+1".
63546347const MCExpr *MipsAsmParser::parseRelocExpr () {
63556348 auto getOp = [](StringRef Op) {
6356- return StringSwitch<MipsMCExpr ::Specifier>(Op)
6349+ return StringSwitch<Mips ::Specifier>(Op)
63576350 .Case (" call16" , Mips::S_GOT_CALL)
63586351 .Case (" call_hi" , Mips::S_CALL_HI16)
63596352 .Case (" call_lo" , Mips::S_CALL_LO16)
@@ -6384,7 +6377,7 @@ const MCExpr *MipsAsmParser::parseRelocExpr() {
63846377 MCAsmParser &Parser = getParser ();
63856378 StringRef Name;
63866379 const MCExpr *Res = nullptr ;
6387- SmallVector<MipsMCExpr ::Specifier, 0 > Ops;
6380+ SmallVector<Mips ::Specifier, 0 > Ops;
63886381 while (parseOptionalToken (AsmToken::Percent)) {
63896382 if (Parser.parseIdentifier (Name) ||
63906383 Parser.parseToken (AsmToken::LParen, " expected '('" ))
0 commit comments