Revert earlier unnecessary hack. Make sure we correctly force on 64bit and cmov...
[oota-llvm.git] / lib / MC / MCAsmStreamer.cpp
index 54e6b5d9b94cccdbc198ad5eced5e62c5e6447fb..d0d69bcb961a3141b1a23e11ebc3ce8484e7066b 100644 (file)
@@ -825,7 +825,7 @@ void MCAsmStreamer::EmitCFIEndProc() {
 }
 
 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);
@@ -1088,7 +1088,7 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst) {
     }
   }
 
-  // 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) {
@@ -1119,7 +1119,7 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst) {
     } 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;
@@ -1128,9 +1128,9 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst) {
         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;
       }