@@ -2965,9 +2965,9 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
29652965 Res.getConstant () == 0 && !IsLocalSym) {
29662966 if (UseXGOT) {
29672967 const MCExpr *CallHiExpr =
2968- MipsMCExpr ::create (Mips::S_CALL_HI16, SymExpr , getContext ());
2968+ MCSpecifierExpr ::create (SymExpr, Mips::S_CALL_HI16, getContext ());
29692969 const MCExpr *CallLoExpr =
2970- MipsMCExpr ::create (Mips::S_CALL_LO16, SymExpr , getContext ());
2970+ MCSpecifierExpr ::create (SymExpr, Mips::S_CALL_LO16, getContext ());
29712971 TOut.emitRX (Mips::LUi, DstReg, MCOperand::createExpr (CallHiExpr), IDLoc,
29722972 STI);
29732973 TOut.emitRRR (IsPtr64 ? Mips::DADDu : Mips::ADDu, DstReg, DstReg, GPReg,
@@ -2976,7 +2976,7 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
29762976 MCOperand::createExpr (CallLoExpr), IDLoc, STI);
29772977 } else {
29782978 const MCExpr *CallExpr =
2979- MipsMCExpr ::create (Mips::S_GOT_CALL, SymExpr , getContext ());
2979+ MCSpecifierExpr ::create (SymExpr, Mips::S_GOT_CALL, getContext ());
29802980 TOut.emitRRX (IsPtr64 ? Mips::LD : Mips::LW, DstReg, GPReg,
29812981 MCOperand::createExpr (CallExpr), IDLoc, STI);
29822982 }
@@ -3009,9 +3009,9 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
30093009 // this happens then the last instruction must use $rd as the result
30103010 // register.
30113011 const MCExpr *CallHiExpr =
3012- MipsMCExpr ::create (Mips::S_GOT_HI16, SymExpr , getContext ());
3013- const MCExpr *CallLoExpr =
3014- MipsMCExpr::create ( Res.getAddSym (), Mips::S_GOT_LO16, getContext ());
3012+ MCSpecifierExpr ::create (SymExpr, Mips::S_GOT_HI16, getContext ());
3013+ const MCExpr *CallLoExpr = MCSpecifierExpr::create (
3014+ Res.getAddSym (), Mips::S_GOT_LO16, getContext ());
30153015
30163016 TOut.emitRX (Mips::LUi, TmpReg, MCOperand::createExpr (CallHiExpr), IDLoc,
30173017 STI);
@@ -3042,8 +3042,8 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
30423042 // The daddiu's marked with a '>' may be omitted if they are redundant. If
30433043 // this happens then the last instruction must use $rd as the result
30443044 // register.
3045- GotExpr =
3046- MipsMCExpr::create (Res. getAddSym (), Mips::S_GOT_DISP, getContext ());
3045+ GotExpr = MCSpecifierExpr::create (Res. getAddSym (), Mips::S_GOT_DISP,
3046+ getContext ());
30473047 if (Res.getConstant () != 0 ) {
30483048 // Symbols fully resolve with just the %got_disp(symbol) but we
30493049 // must still account for any offset to the symbol for
@@ -3070,14 +3070,14 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
30703070 // this happens then the last instruction must use $rd as the result
30713071 // register.
30723072 if (IsLocalSym) {
3073- GotExpr = MipsMCExpr ::create (Mips::S_GOT, SymExpr , getContext ());
3074- LoExpr = MipsMCExpr ::create (Mips::S_LO, SymExpr , getContext ());
3073+ GotExpr = MCSpecifierExpr ::create (SymExpr, Mips::S_GOT, getContext ());
3074+ LoExpr = MCSpecifierExpr ::create (SymExpr, Mips::S_LO, getContext ());
30753075 } else {
30763076 // External symbols fully resolve the symbol with just the %got(symbol)
30773077 // but we must still account for any offset to the symbol for
30783078 // expressions like symbol+8.
30793079 GotExpr =
3080- MipsMCExpr ::create (Res.getAddSym (), Mips::S_GOT, getContext ());
3080+ MCSpecifierExpr ::create (Res.getAddSym (), Mips::S_GOT, getContext ());
30813081 if (Res.getConstant () != 0 )
30823082 LoExpr = MCConstantExpr::create (Res.getConstant (), getContext ());
30833083 }
@@ -3097,8 +3097,10 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
30973097 return false ;
30983098 }
30993099
3100- const auto *HiExpr = MipsMCExpr::create (Mips::S_HI, SymExpr, getContext ());
3101- const auto *LoExpr = MipsMCExpr::create (Mips::S_LO, SymExpr, getContext ());
3100+ const auto *HiExpr =
3101+ MCSpecifierExpr::create (SymExpr, Mips::S_HI, getContext ());
3102+ const auto *LoExpr =
3103+ MCSpecifierExpr::create (SymExpr, Mips::S_LO, getContext ());
31023104
31033105 // This is the 64-bit symbol address expansion.
31043106 if (ABI.ArePtrs64bit () && isGP64bit ()) {
@@ -3110,9 +3112,9 @@ bool MipsAsmParser::loadAndAddSymbolAddress(const MCExpr *SymExpr,
31103112 // source register.
31113113
31123114 const auto *HighestExpr =
3113- MipsMCExpr ::create (Mips::S_HIGHEST, SymExpr , getContext ());
3115+ MCSpecifierExpr ::create (SymExpr, Mips::S_HIGHEST, getContext ());
31143116 const auto *HigherExpr =
3115- MipsMCExpr ::create (Mips::S_HIGHER, SymExpr , getContext ());
3117+ MCSpecifierExpr ::create (SymExpr, Mips::S_HIGHER, getContext ());
31163118
31173119 bool RdRegIsRsReg =
31183120 UseSrcReg &&
@@ -3310,7 +3312,8 @@ bool MipsAsmParser::emitPartialAddress(MipsTargetStreamer &TOut, SMLoc IDLoc,
33103312
33113313 if (IsPicEnabled) {
33123314 const MCExpr *GotSym = MCSymbolRefExpr::create (Sym, getContext ());
3313- const auto *GotExpr = MipsMCExpr::create (Mips::S_GOT, GotSym, getContext ());
3315+ const auto *GotExpr =
3316+ MCSpecifierExpr::create (GotSym, Mips::S_GOT, getContext ());
33143317
33153318 if (isABI_O32 () || isABI_N32 ()) {
33163319 TOut.emitRRX (Mips::LW, ATReg, GPReg, MCOperand::createExpr (GotExpr),
@@ -3321,7 +3324,8 @@ bool MipsAsmParser::emitPartialAddress(MipsTargetStreamer &TOut, SMLoc IDLoc,
33213324 }
33223325 } else { // !IsPicEnabled
33233326 const MCExpr *HiSym = MCSymbolRefExpr::create (Sym, getContext ());
3324- const auto *HiExpr = MipsMCExpr::create (Mips::S_HI, HiSym, getContext ());
3327+ const auto *HiExpr =
3328+ MCSpecifierExpr::create (HiSym, Mips::S_HI, getContext ());
33253329
33263330 // FIXME: This is technically correct but gives a different result to gas,
33273331 // but gas is incomplete there (it has a fixme noting it doesn't work with
@@ -3334,10 +3338,10 @@ bool MipsAsmParser::emitPartialAddress(MipsTargetStreamer &TOut, SMLoc IDLoc,
33343338 } else { // isABI_N64()
33353339 const MCExpr *HighestSym = MCSymbolRefExpr::create (Sym, getContext ());
33363340 const auto *HighestExpr =
3337- MipsMCExpr ::create (Mips::S_HIGHEST, HighestSym , getContext ());
3341+ MCSpecifierExpr ::create (HighestSym, Mips::S_HIGHEST, getContext ());
33383342 const MCExpr *HigherSym = MCSymbolRefExpr::create (Sym, getContext ());
33393343 const auto *HigherExpr =
3340- MipsMCExpr ::create (Mips::S_HIGHER, HigherSym , getContext ());
3344+ MCSpecifierExpr ::create (HigherSym, Mips::S_HIGHER, getContext ());
33413345
33423346 TOut.emitRX (Mips::LUi, ATReg, MCOperand::createExpr (HighestExpr), IDLoc,
33433347 STI);
@@ -3424,7 +3428,7 @@ bool MipsAsmParser::expandLoadSingleImmToFPR(MCInst &Inst, SMLoc IDLoc,
34243428
34253429 MCSymbol *Sym = getContext ().createTempSymbol ();
34263430 const MCExpr *LoSym = MCSymbolRefExpr::create (Sym, getContext ());
3427- const auto *LoExpr = MipsMCExpr ::create (Mips::S_LO, LoSym , getContext ());
3431+ const auto *LoExpr = MCSpecifierExpr ::create (LoSym, Mips::S_LO, getContext ());
34283432
34293433 getStreamer ().switchSection (ReadOnlySection);
34303434 getStreamer ().emitLabel (Sym, IDLoc);
@@ -3474,7 +3478,7 @@ bool MipsAsmParser::expandLoadDoubleImmToGPR(MCInst &Inst, SMLoc IDLoc,
34743478
34753479 MCSymbol *Sym = getContext ().createTempSymbol ();
34763480 const MCExpr *LoSym = MCSymbolRefExpr::create (Sym, getContext ());
3477- const auto *LoExpr = MipsMCExpr ::create (Mips::S_LO, LoSym , getContext ());
3481+ const auto *LoExpr = MCSpecifierExpr ::create (LoSym, Mips::S_LO, getContext ());
34783482
34793483 getStreamer ().switchSection (ReadOnlySection);
34803484 getStreamer ().emitLabel (Sym, IDLoc);
@@ -3554,7 +3558,7 @@ bool MipsAsmParser::expandLoadDoubleImmToFPR(MCInst &Inst, bool Is64FPU,
35543558
35553559 MCSymbol *Sym = getContext ().createTempSymbol ();
35563560 const MCExpr *LoSym = MCSymbolRefExpr::create (Sym, getContext ());
3557- const auto *LoExpr = MipsMCExpr ::create (Mips::S_LO, LoSym , getContext ());
3561+ const auto *LoExpr = MCSpecifierExpr ::create (LoSym, Mips::S_LO, getContext ());
35583562
35593563 getStreamer ().switchSection (ReadOnlySection);
35603564 getStreamer ().emitLabel (Sym, IDLoc);
@@ -3777,15 +3781,15 @@ void MipsAsmParser::expandMem16Inst(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
37773781 // sw $8, %lo(sym)($at)
37783782 const MCExpr *OffExpr = OffsetOp.getExpr ();
37793783 MCOperand LoOperand = MCOperand::createExpr (
3780- MipsMCExpr ::create (Mips::S_LO, OffExpr , getContext ()));
3784+ MCSpecifierExpr ::create (OffExpr, Mips::S_LO, getContext ()));
37813785 MCOperand HiOperand = MCOperand::createExpr (
3782- MipsMCExpr ::create (Mips::S_HI, OffExpr , getContext ()));
3786+ MCSpecifierExpr ::create (OffExpr, Mips::S_HI, getContext ()));
37833787
37843788 if (ABI.IsN64 ()) {
37853789 MCOperand HighestOperand = MCOperand::createExpr (
3786- MipsMCExpr ::create (Mips::S_HIGHEST, OffExpr , getContext ()));
3790+ MCSpecifierExpr ::create (OffExpr, Mips::S_HIGHEST, getContext ()));
37873791 MCOperand HigherOperand = MCOperand::createExpr (
3788- MipsMCExpr ::create (Mips::S_HIGHER, OffExpr , getContext ()));
3792+ MCSpecifierExpr ::create (OffExpr, Mips::S_HIGHER, getContext ()));
37893793
37903794 TOut.emitRX (Mips::LUi, TmpReg, HighestOperand, IDLoc, STI);
37913795 TOut.emitRRX (Mips::DADDiu, TmpReg, TmpReg, HigherOperand, IDLoc, STI);
@@ -6394,7 +6398,7 @@ const MCExpr *MipsAsmParser::parseRelocExpr() {
63946398 while (Ops.size ()) {
63956399 if (Parser.parseToken (AsmToken::RParen, " expected ')'" ))
63966400 return nullptr ;
6397- Res = MipsMCExpr ::create (Ops.pop_back_val (), Res , getContext ());
6401+ Res = MCSpecifierExpr ::create (Res, Ops.pop_back_val (), getContext ());
63986402 }
63996403 return Res;
64006404}
0 commit comments