File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
llvm/lib/Target/RISCV/MCTargetDesc Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -126,16 +126,16 @@ class RISCVMCInstrAnalysis : public MCInstrAnalysis {
126
126
int64_t GPRState[31 ] = {};
127
127
std::bitset<31 > GPRValidMask;
128
128
129
- static bool isGPR (unsigned Reg) {
129
+ static bool isGPR (MCRegister Reg) {
130
130
return Reg >= RISCV::X0 && Reg <= RISCV::X31;
131
131
}
132
132
133
- static unsigned getRegIndex (unsigned Reg) {
133
+ static unsigned getRegIndex (MCRegister Reg) {
134
134
assert (isGPR (Reg) && Reg != RISCV::X0 && " Invalid GPR reg" );
135
135
return Reg - RISCV::X1;
136
136
}
137
137
138
- void setGPRState (unsigned Reg, std::optional<int64_t > Value) {
138
+ void setGPRState (MCRegister Reg, std::optional<int64_t > Value) {
139
139
if (Reg == RISCV::X0)
140
140
return ;
141
141
@@ -149,7 +149,7 @@ class RISCVMCInstrAnalysis : public MCInstrAnalysis {
149
149
}
150
150
}
151
151
152
- std::optional<int64_t > getGPRState (unsigned Reg) const {
152
+ std::optional<int64_t > getGPRState (MCRegister Reg) const {
153
153
if (Reg == RISCV::X0)
154
154
return 0 ;
155
155
@@ -301,7 +301,7 @@ class RISCVMCInstrAnalysis : public MCInstrAnalysis {
301
301
}
302
302
303
303
private:
304
- static bool maybeReturnAddress (unsigned Reg) {
304
+ static bool maybeReturnAddress (MCRegister Reg) {
305
305
// X1 is used for normal returns, X5 for returns from outlined functions.
306
306
return Reg == RISCV::X1 || Reg == RISCV::X5;
307
307
}
You can’t perform that action at this time.
0 commit comments