1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[readobj] Use ListSeparator (NFC)

This commit is contained in:
Kazu Hirata 2021-03-01 23:40:31 -08:00
parent 87e2d85669
commit e503e87089

View File

@ -184,31 +184,16 @@ void Decoder::printRegisters(const std::pair<uint16_t, uint32_t> &RegisterMask)
const uint16_t VFPMask = std::get<1>(RegisterMask);
OS << '{';
bool Comma = false;
for (unsigned RI = 0, RE = 11; RI < RE; ++RI) {
if (GPRMask & (1 << RI)) {
if (Comma)
OS << ", ";
OS << GPRRegisterNames[RI];
Comma = true;
}
}
for (unsigned RI = 0, RE = 32; RI < RE; ++RI) {
if (VFPMask & (1 << RI)) {
if (Comma)
OS << ", ";
OS << "d" << unsigned(RI);
Comma = true;
}
}
for (unsigned RI = 11, RE = 16; RI < RE; ++RI) {
if (GPRMask & (1 << RI)) {
if (Comma)
OS << ", ";
OS << GPRRegisterNames[RI];
Comma = true;
}
}
ListSeparator LS;
for (unsigned RI = 0, RE = 11; RI < RE; ++RI)
if (GPRMask & (1 << RI))
OS << LS << GPRRegisterNames[RI];
for (unsigned RI = 0, RE = 32; RI < RE; ++RI)
if (VFPMask & (1 << RI))
OS << LS << "d" << unsigned(RI);
for (unsigned RI = 11, RE = 16; RI < RE; ++RI)
if (GPRMask & (1 << RI))
OS << LS << GPRRegisterNames[RI];
OS << '}';
}