}
void MCAsmStreamer::EmitRegisterName(int64_t Register) {
- if (InstPrinter) {
+ if (InstPrinter && !MAI.useDwarfRegNumForCFI()) {
const TargetAsmInfo &asmInfo = getContext().getTargetAsmInfo();
unsigned LLVMRegister = asmInfo.getLLVMRegNum(Register, true);
InstPrinter->printRegName(OS, LLVMRegister);
}
}
- // FIXME: Node the fixup comments for Thumb2 are completely bogus since the
+ // FIXME: Note the fixup comments for Thumb2 are completely bogus since the
// high order halfword of a 32-bit Thumb2 instruction is emitted first.
OS << "encoding: [";
for (unsigned i = 0, e = Code.size(); i != e; ++i) {
} else {
// Otherwise, write out in binary.
OS << "0b";
- for (int j = 7; j >= 0; j--) {
+ for (unsigned j = 8; j--;) {
unsigned Bit = (Code[i] >> j) & 1;
unsigned FixupBit;
else
FixupBit = i * 8 + (7-j);
- if (uint8_t FixupMapEntry = FixupMap[FixupBit]) {
- //assert(Bit == 0 && "Encoder wrote into fixed up bit!");
- OS << char('A' + FixupMapEntry - 1);
+ if (uint8_t MapEntry = FixupMap[FixupBit]) {
+ assert(Bit == 0 && "Encoder wrote into fixed up bit!");
+ OS << char('A' + MapEntry - 1);
} else
OS << Bit;
}