diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-11-08 23:05:05 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-11-08 23:05:05 +0000 |
commit | 0b45c9957fb7ad47e653fb43d455f6727170dad0 (patch) | |
tree | bcaf4d05aa32424c8ae081fd53b2b0cbc282e723 /lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | |
parent | b5b9252a174d4d26f66372893595aeeaaf7390f9 (diff) | |
download | external_llvm-0b45c9957fb7ad47e653fb43d455f6727170dad0.zip external_llvm-0b45c9957fb7ad47e653fb43d455f6727170dad0.tar.gz external_llvm-0b45c9957fb7ad47e653fb43d455f6727170dad0.tar.bz2 |
Temporary revert my last commit: it seems it's triggering some subtle bug in backend
and breaks llvm-gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58926 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 66319c3..556757a 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -344,7 +344,11 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo, O << "@GOTOFF"; } - printOffset(MO.getOffset()); + int Offset = MO.getOffset(); + if (Offset > 0) + O << '+' << Offset; + else if (Offset < 0) + O << Offset; if (isMemOp && Subtarget->isPICStyleRIPRel() && !NotRIPRel) O << "(%rip)"; @@ -425,7 +429,11 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo, if (GV->hasExternalWeakLinkage()) ExtWeakSymbols.insert(GV); - printOffset(MO.getOffset()); + int Offset = MO.getOffset(); + if (Offset > 0) + O << '+' << Offset; + else if (Offset < 0) + O << Offset; if (isThreadLocal) { if (TM.getRelocationModel() == Reloc::PIC_ || Subtarget->is64Bit()) |