diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-04-08 21:14:34 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-04-08 21:14:34 +0000 |
commit | 094fad37b90946c91a09eb9270a0dbe800f49d87 (patch) | |
tree | 7d025aa19bd757a6367886e31026a87f6650e88a /lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | |
parent | 83593a369b95d8ae6966b9f5d7b6328a298c2b9a (diff) | |
download | external_llvm-094fad37b90946c91a09eb9270a0dbe800f49d87.zip external_llvm-094fad37b90946c91a09eb9270a0dbe800f49d87.tar.gz external_llvm-094fad37b90946c91a09eb9270a0dbe800f49d87.tar.bz2 |
Re-apply 68552.
Tested by bootstrapping llvm-gcc and using that to build llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 3b6b0ef..e9b62a8 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -566,9 +566,8 @@ void X86ATTAsmPrinter::printSSECC(const MachineInstr *MI, unsigned Op) { } } -void X86ATTAsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op, - const char *Modifier){ - assert(isMem(MI, Op) && "Invalid memory reference!"); +void X86ATTAsmPrinter::printLeaMemReference(const MachineInstr *MI, unsigned Op, + const char *Modifier){ MachineOperand BaseReg = MI->getOperand(Op); MachineOperand IndexReg = MI->getOperand(Op+2); const MachineOperand &DispSpec = MI->getOperand(Op+3); @@ -611,6 +610,17 @@ void X86ATTAsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op, } } +void X86ATTAsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op, + const char *Modifier){ + assert(isMem(MI, Op) && "Invalid memory reference!"); + MachineOperand Segment = MI->getOperand(Op+4); + if (Segment.getReg()) { + printOperand(MI, Op+4, Modifier); + O << ':'; + } + printLeaMemReference(MI, Op, Modifier); +} + void X86ATTAsmPrinter::printPICJumpTableSetLabel(unsigned uid, const MachineBasicBlock *MBB) const { if (!TAI->getSetDirective()) |