diff --git a/src/frontend/arm_types.cpp b/src/frontend/arm_types.cpp index 3fe4813f..7e856aa2 100644 --- a/src/frontend/arm_types.cpp +++ b/src/frontend/arm_types.cpp @@ -24,6 +24,16 @@ const char* RegToString(Reg reg) { return reg_strs.at(static_cast(reg)); } +const char* ExtRegToString(ExtReg reg) { + constexpr std::array reg_strs = { + "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31", + "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15", + "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31", + }; + return reg_strs.at(static_cast(reg)); +} + std::string RegListToString(RegList reg_list) { std::string ret = ""; bool first_reg = true; diff --git a/src/frontend/arm_types.h b/src/frontend/arm_types.h index b5c6da69..159a4ad9 100644 --- a/src/frontend/arm_types.h +++ b/src/frontend/arm_types.h @@ -121,6 +121,7 @@ struct LocationDescriptorHash { const char* CondToString(Cond cond, bool explicit_al = false); const char* RegToString(Reg reg); +const char* ExtRegToString(ExtReg reg); std::string RegListToString(RegList reg_list); inline Reg operator+(Reg reg, int number) { diff --git a/src/frontend/ir/ir.cpp b/src/frontend/ir/ir.cpp index ae62f770..94ac140c 100644 --- a/src/frontend/ir/ir.cpp +++ b/src/frontend/ir/ir.cpp @@ -219,6 +219,8 @@ std::string DumpBlock(const IR::Block& block) { return Common::StringFromFormat("#%#x", arg.GetU32()); case Type::RegRef: return Arm::RegToString(arg.GetRegRef()); + case Type::ExtRegRef: + return Arm::ExtRegToString(arg.GetExtRegRef()); default: return ""; }