diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-04-07 21:37:46 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-04-07 21:37:46 +0000 |
commit | 2a6411bbbdc6a23605fa206e07fc4f99a3d5dff2 (patch) | |
tree | b9e67793e18fac6ecbadcedde6ed0e19d0b58347 /lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h | |
parent | 4fd552880c9f42f117bd79929ea0179f99bd6bb7 (diff) | |
download | external_llvm-2a6411bbbdc6a23605fa206e07fc4f99a3d5dff2.zip external_llvm-2a6411bbbdc6a23605fa206e07fc4f99a3d5dff2.tar.gz external_llvm-2a6411bbbdc6a23605fa206e07fc4f99a3d5dff2.tar.bz2 |
Reduce code duplication on the TLS implementation.
This introduces a small regression on the generated code
quality in the case we are just computing addresses, not
loading values.
Will work on it and on X86-64 support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68552 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h index ae84df2..489d946 100644 --- a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h +++ b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h @@ -88,9 +88,17 @@ struct VISIBILITY_HIDDEN X86IntelAsmPrinter : public AsmPrinter { O << "XMMWORD PTR "; printMemReference(MI, OpNo); } + void printlea32mem(const MachineInstr *MI, unsigned OpNo) { + O << "DWORD PTR "; + printLeaMemReference(MI, OpNo); + } + void printlea64mem(const MachineInstr *MI, unsigned OpNo) { + O << "QWORD PTR "; + printLeaMemReference(MI, OpNo); + } void printlea64_32mem(const MachineInstr *MI, unsigned OpNo) { O << "QWORD PTR "; - printMemReference(MI, OpNo, "subreg64"); + printLeaMemReference(MI, OpNo, "subreg64"); } bool printAsmMRegister(const MachineOperand &MO, const char Mode); @@ -103,6 +111,8 @@ struct VISIBILITY_HIDDEN X86IntelAsmPrinter : public AsmPrinter { void printSSECC(const MachineInstr *MI, unsigned Op); void printMemReference(const MachineInstr *MI, unsigned Op, const char *Modifier=NULL); + void printLeaMemReference(const MachineInstr *MI, unsigned Op, + const char *Modifier=NULL); void printPICJumpTableSetLabel(unsigned uid, const MachineBasicBlock *MBB) const; void printPICJumpTableSetLabel(unsigned uid, unsigned uid2, |