@@ -544,9 +544,9 @@ struct RISCVOperand final : public MCParsedAsmOperand {
544
544
if (evaluateConstantImm (getImm (), Imm))
545
545
return isShiftedInt<N - 1 , 1 >(fixImmediateForRV32 (Imm, isRV64Imm ()));
546
546
547
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
547
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
548
548
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
549
- VK == RISCVMCExpr::VK_None ;
549
+ VK == RISCV::S_None ;
550
550
}
551
551
552
552
// True if operand is a symbol with no modifiers, or a constant with no
@@ -559,9 +559,9 @@ struct RISCVOperand final : public MCParsedAsmOperand {
559
559
if (evaluateConstantImm (getImm (), Imm))
560
560
return isInt<N>(fixImmediateForRV32 (Imm, isRV64Imm ()));
561
561
562
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
562
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
563
563
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
564
- VK == RISCVMCExpr::VK_None ;
564
+ VK == RISCV::S_None ;
565
565
}
566
566
567
567
// Predicate methods for AsmOperands defined in RISCVInstrInfo.td
@@ -572,9 +572,9 @@ struct RISCVOperand final : public MCParsedAsmOperand {
572
572
if (!isImm () || evaluateConstantImm (getImm (), Imm))
573
573
return false ;
574
574
575
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
575
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
576
576
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
577
- VK == RISCVMCExpr::VK_None ;
577
+ VK == RISCV::S_None ;
578
578
}
579
579
580
580
bool isCallSymbol () const {
@@ -583,7 +583,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
583
583
if (!isImm () || evaluateConstantImm (getImm (), Imm))
584
584
return false ;
585
585
586
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
586
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
587
587
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
588
588
VK == ELF::R_RISCV_CALL_PLT;
589
589
}
@@ -594,7 +594,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
594
594
if (!isImm () || evaluateConstantImm (getImm (), Imm))
595
595
return false ;
596
596
597
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
597
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
598
598
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
599
599
VK == ELF::R_RISCV_CALL_PLT;
600
600
}
@@ -605,7 +605,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
605
605
if (!isImm () || evaluateConstantImm (getImm (), Imm))
606
606
return false ;
607
607
608
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
608
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
609
609
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
610
610
VK == ELF::R_RISCV_TPREL_ADD;
611
611
}
@@ -616,7 +616,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
616
616
if (!isImm () || evaluateConstantImm (getImm (), Imm))
617
617
return false ;
618
618
619
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
619
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
620
620
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
621
621
VK == ELF::R_RISCV_TLSDESC_CALL;
622
622
}
@@ -870,11 +870,10 @@ struct RISCVOperand final : public MCParsedAsmOperand {
870
870
if (evaluateConstantImm (getImm (), Imm))
871
871
return isInt<12 >(fixImmediateForRV32 (Imm, isRV64Imm ()));
872
872
873
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
873
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
874
874
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
875
- (VK == RISCVMCExpr::VK_LO || VK == RISCVMCExpr::VK_PCREL_LO ||
876
- VK == RISCVMCExpr::VK_TPREL_LO ||
877
- VK == ELF::R_RISCV_TLSDESC_LOAD_LO12 ||
875
+ (VK == RISCV::S_LO || VK == RISCV::S_PCREL_LO ||
876
+ VK == RISCV::S_TPREL_LO || VK == ELF::R_RISCV_TLSDESC_LOAD_LO12 ||
878
877
VK == ELF::R_RISCV_TLSDESC_ADD_LO12);
879
878
}
880
879
@@ -903,9 +902,9 @@ struct RISCVOperand final : public MCParsedAsmOperand {
903
902
if (evaluateConstantImm (getImm (), Imm))
904
903
return isInt<20 >(fixImmediateForRV32 (Imm, isRV64Imm ()));
905
904
906
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
905
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
907
906
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
908
- VK == RISCVMCExpr::VK_QC_ABS20 ;
907
+ VK == RISCV::S_QC_ABS20 ;
909
908
}
910
909
911
910
bool isUImm20LUI () const {
@@ -916,7 +915,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
916
915
if (evaluateConstantImm (getImm (), Imm))
917
916
return isUInt<20 >(Imm);
918
917
919
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
918
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
920
919
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
921
920
(VK == ELF::R_RISCV_HI20 || VK == ELF::R_RISCV_TPREL_HI20);
922
921
}
@@ -929,7 +928,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
929
928
if (evaluateConstantImm (getImm (), Imm))
930
929
return isUInt<20 >(Imm);
931
930
932
- RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None ;
931
+ RISCVMCExpr::Specifier VK = RISCV::S_None ;
933
932
return RISCVAsmParser::classifySymbolRef (getImm (), VK) &&
934
933
(VK == ELF::R_RISCV_PCREL_HI20 || VK == ELF::R_RISCV_GOT_HI20 ||
935
934
VK == ELF::R_RISCV_TLS_GOT_HI20 || VK == ELF::R_RISCV_TLS_GD_HI20 ||
@@ -2920,7 +2919,7 @@ bool RISCVAsmParser::parseInstruction(ParseInstructionInfo &Info,
2920
2919
2921
2920
bool RISCVAsmParser::classifySymbolRef (const MCExpr *Expr,
2922
2921
RISCVMCExpr::Specifier &Kind) {
2923
- Kind = RISCVMCExpr::VK_None ;
2922
+ Kind = RISCV::S_None ;
2924
2923
2925
2924
if (const RISCVMCExpr *RE = dyn_cast<RISCVMCExpr>(Expr)) {
2926
2925
Kind = RE->getSpecifier ();
@@ -2929,14 +2928,14 @@ bool RISCVAsmParser::classifySymbolRef(const MCExpr *Expr,
2929
2928
2930
2929
MCValue Res;
2931
2930
if (Expr->evaluateAsRelocatable (Res, nullptr ))
2932
- return Res.getSpecifier () == RISCVMCExpr::VK_None ;
2931
+ return Res.getSpecifier () == RISCV::S_None ;
2933
2932
return false ;
2934
2933
}
2935
2934
2936
2935
bool RISCVAsmParser::isSymbolDiff (const MCExpr *Expr) {
2937
2936
MCValue Res;
2938
2937
if (Expr->evaluateAsRelocatable (Res, nullptr )) {
2939
- return Res.getSpecifier () == RISCVMCExpr::VK_None && Res.getAddSym () &&
2938
+ return Res.getSpecifier () == RISCV::S_None && Res.getAddSym () &&
2940
2939
Res.getSubSym ();
2941
2940
}
2942
2941
return false ;
@@ -3451,7 +3450,7 @@ void RISCVAsmParser::emitAuipcInstPair(MCRegister DestReg, MCRegister TmpReg,
3451
3450
MCInstBuilder (RISCV::AUIPC).addReg (TmpReg).addExpr (SymbolHi));
3452
3451
3453
3452
const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create (
3454
- MCSymbolRefExpr::create (TmpLabel, Ctx), RISCVMCExpr::VK_PCREL_LO , Ctx);
3453
+ MCSymbolRefExpr::create (TmpLabel, Ctx), RISCV::S_PCREL_LO , Ctx);
3455
3454
3456
3455
emitToStreamer (Out, MCInstBuilder (SecondOpcode)
3457
3456
.addReg (DestReg)
0 commit comments