#include "mir/MIR.h" #include namespace mir { const char* PhysRegName(PhysReg reg) { switch (reg) { case PhysReg::W0: return "w0"; case PhysReg::W8: return "w8"; case PhysReg::W9: return "w9"; case PhysReg::X29: return "x29"; case PhysReg::X30: return "x30"; case PhysReg::SP: return "sp"; } throw std::runtime_error("未知物理寄存器"); } } // namespace mir