diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-05-19 15:26:43 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-05-19 15:26:43 +0000 |
commit | 52322e7b8b45210c78c164e74048212373d849da (patch) | |
tree | 6f8237e097e9419ca1f34475f6c0185181984bd9 /lib/Target/X86/AsmPrinter | |
parent | 7d4bd203be35a25e31256eeea4ef7628573ffa54 (diff) | |
download | external_llvm-52322e7b8b45210c78c164e74048212373d849da.zip external_llvm-52322e7b8b45210c78c164e74048212373d849da.tar.gz external_llvm-52322e7b8b45210c78c164e74048212373d849da.tar.bz2 |
MC/X86: Lower TAILCALLd[64] to JMP_1, to allow relaxation and to avoid same
prefix byte problem as in r104062.
- As a total hack to keep the TAILCALL markers in the output, which some tests depend on, this invents a new TAILJMP_1 instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp index ec90fd6..4edeca9 100644 --- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp +++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp @@ -379,6 +379,16 @@ void X86MCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { break; } + // TAILJMPd, TAILJMPd64 - Lower to the correct jump instructions. + case X86::TAILJMPd: + case X86::TAILJMPd64: { + MCOperand Saved = OutMI.getOperand(0); + OutMI = MCInst(); + OutMI.setOpcode(X86::TAILJMP_1); + OutMI.addOperand(Saved); + break; + } + // The assembler backend wants to see branches in their small form and relax // them to their large form. The JIT can only handle the large form because // it does not do relaxation. For now, translate the large form to the |