diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-02-03 04:33:00 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-02-03 04:33:00 +0000 |
commit | 6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760 (patch) | |
tree | a4ccd8fe12fbd58b2ca6fb64601acc7d41d71f38 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | aab219110994cc4d848fae5f50166a2f70ccc812 (diff) | |
download | llvm-6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760.tar.gz llvm-6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760.tar.bz2 llvm-6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760.tar.xz |
Add a new MachineJumpTableInfo entry type, EK_GPRel64BlockAddress, which is
needed to emit a 64-bit gp-relative relocation entry. Make changes necessary
for emitting jump tables which have entries with directive .gpdword. This patch
does not implement the parts needed for direct object emission or JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149668 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 4c093665c8..43af3423de 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1155,6 +1155,15 @@ void AsmPrinter::EmitJumpTableEntry(const MachineJumpTableInfo *MJTI, return; } + case MachineJumpTableInfo::EK_GPRel64BlockAddress: { + // EK_GPRel64BlockAddress - Each entry is an address of block, encoded + // with a relocation as gp-relative, e.g.: + // .gpdword LBB123 + MCSymbol *MBBSym = MBB->getSymbol(); + OutStreamer.EmitGPRel64Value(MCSymbolRefExpr::Create(MBBSym, OutContext)); + return; + } + case MachineJumpTableInfo::EK_LabelDifference32: { // EK_LabelDifference32 - Each entry is the address of the block minus // the address of the jump table. This is used for PIC jump tables where |