Asm printing bug.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 5 Dec 2006 06:43:58 +0000 (06:43 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 5 Dec 2006 06:43:58 +0000 (06:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32218 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ATTAsmPrinter.cpp

index 85ae8388993ff8f64e00c29b5997413fe5deec45..79963eee1d2d914ae7057eedff98f23c1d98619c 100755 (executable)
@@ -192,7 +192,7 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
     if (X86PICStyle == PICStyle::Stub &&
         TM.getRelocationModel() == Reloc::PIC_)
       O << "-\"L" << getFunctionNumber() << "$pb\"";
-    if (Subtarget->is64Bit())
+    if (isMemOp && Subtarget->is64Bit())
       O << "(%rip)";
     return;
   }
@@ -210,7 +210,7 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
     else if (Offset < 0)
       O << Offset;
 
-    if (Subtarget->is64Bit())
+    if (isMemOp && Subtarget->is64Bit())
       O << "(%rip)";
     return;
   }
@@ -265,8 +265,7 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
     else if (Offset < 0)
       O << Offset;
 
-    if (isMemOp &&
-        Subtarget->is64Bit()) {
+    if (isMemOp && Subtarget->is64Bit()) {
       if (isExt && TM.getRelocationModel() != Reloc::Static)
         O << "@GOTPCREL";
       O << "(%rip)";
@@ -288,8 +287,7 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
     if (!isCallOp) O << '$';
     O << TAI->getGlobalPrefix() << MO.getSymbolName();
 
-    if (!isCallOp &&
-        Subtarget->is64Bit())
+    if (!isCallOp && Subtarget->is64Bit())
       O << "(%rip)";
 
     return;