[backend]回溯了旧版本的寄存器分配器

This commit is contained in:
Lixuanwang
2025-08-16 17:08:11 +08:00
parent 7be5d25372
commit 072cd3e9b5
6 changed files with 793 additions and 5 deletions

View File

@@ -184,7 +184,7 @@ void RISCv64AsmPrinter::printOperand(MachineOperand* op) {
}
}
std::string RISCv64AsmPrinter::regToString(PhysicalReg reg) {
std::string RISCv64AsmPrinter::regToString(PhysicalReg reg) const {
switch (reg) {
case PhysicalReg::ZERO: return "x0"; case PhysicalReg::RA: return "ra";
case PhysicalReg::SP: return "sp"; case PhysicalReg::GP: return "gp";