Refactor MipsAsmParser::getATReg to return an internal register number instead of a register index.
Also change all the int's to unsigned, seeing as the current AT register index is stored as an unsigned in MipsAssemblerOptions.
Details
Diff Detail
Event Timeline
I agree with changing the int's to unsigned but I think the re-factor is going in the wrong direction at the moment. Instead of partially inlining MipsAsmParser::getATReg() and having a predicate function with side effects (error messages), I'd instead either rename it getATRegIndex() to make it clear it's an index rather than an internal register number, or I'd move the getReg() call inside the function so that it does return an internal register number.
Reverted the isATAvailable change.
Changed getATReg to return an internal register number instead of a register index.
LGTM
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
2400 | We should correct this getATRegNum() function too since it really returns an index. That can be a follow-on patch if you prefer. |
We should correct this getATRegNum() function too since it really returns an index. That can be a follow-on patch if you prefer.