diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-25 21:10:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-25 21:10:10 +0000 |
commit | 19bd0398962e93f6df51f40ab1a88892f73a7b4a (patch) | |
tree | 883f2f6f503a09bc7d0514e84fb19207e0e6f949 /llvm/lib | |
parent | 6dc73bc1837460d9e49373ff0f1d01e63a82cbf2 (diff) | |
download | bcm5719-llvm-19bd0398962e93f6df51f40ab1a88892f73a7b4a.tar.gz bcm5719-llvm-19bd0398962e93f6df51f40ab1a88892f73a7b4a.zip |
rename MAI::PICJumpTableDirective to MAI::GPRel32Directive to
make it clear what it is, instead of how it is used.
llvm-svn: 94448
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 16 | ||||
-rw-r--r-- | llvm/lib/MC/MCAsmInfo.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/Mips/MipsMCAsmInfo.cpp | 2 |
4 files changed, 10 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 3077ae371d6..7a44a016560 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -541,15 +541,14 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, void AsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI, const MachineBasicBlock *MBB, unsigned uid) const { - // Use JumpTableDirective otherwise honor the entry size from the jump table - // info. - const char *JTEntryDirective = MAI->getPICJumpTableDirective(); - bool HadJTEntryDirective = JTEntryDirective != NULL; - if (!HadJTEntryDirective) { - JTEntryDirective = MJTI->getEntrySize() == 4 ? - MAI->getData32bitsDirective() : MAI->getData64bitsDirective(); + // If the target supports GPRel, use it. + if (const char *GPRel32Dir = MAI->getGPRel32Directive()) { + O << GPRel32Dir << *GetMBBSymbol(MBB->getNumber()) << '\n'; + return; } + const char *JTEntryDirective = MJTI->getEntrySize() == 4 ? + MAI->getData32bitsDirective() : MAI->getData64bitsDirective(); O << JTEntryDirective << ' '; // If we have emitted set directives for the jump table entries, print @@ -564,8 +563,7 @@ void AsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI, O << *GetMBBSymbol(MBB->getNumber()); // If the arch uses custom Jump Table directives, don't calc relative to // JT. - if (!HadJTEntryDirective) - O << '-' << *GetJTISymbol(uid); + O << '-' << *GetJTISymbol(uid); } O << '\n'; } diff --git a/llvm/lib/MC/MCAsmInfo.cpp b/llvm/lib/MC/MCAsmInfo.cpp index 0f3c46ba826..796dcc4d330 100644 --- a/llvm/lib/MC/MCAsmInfo.cpp +++ b/llvm/lib/MC/MCAsmInfo.cpp @@ -48,7 +48,7 @@ MCAsmInfo::MCAsmInfo() { AlignDirective = "\t.align\t"; AlignmentIsInBytes = true; TextAlignFillValue = 0; - PICJumpTableDirective = 0; + GPRel32Directive = 0; GlobalDirective = "\t.globl\t"; SetDirective = 0; HasLCOMMDirective = false; diff --git a/llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp b/llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp index b652a5305a0..0e63582faca 100644 --- a/llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp +++ b/llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp @@ -17,6 +17,6 @@ using namespace llvm; AlphaMCAsmInfo::AlphaMCAsmInfo(const Target &T, const StringRef &TT) { AlignmentIsInBytes = false; PrivateGlobalPrefix = "$"; - PICJumpTableDirective = ".gprel32"; + GPRel32Directive = ".gprel32"; WeakRefDirective = "\t.weak\t"; } diff --git a/llvm/lib/Target/Mips/MipsMCAsmInfo.cpp b/llvm/lib/Target/Mips/MipsMCAsmInfo.cpp index 2fa276298e5..c5356f0e23a 100644 --- a/llvm/lib/Target/Mips/MipsMCAsmInfo.cpp +++ b/llvm/lib/Target/Mips/MipsMCAsmInfo.cpp @@ -22,5 +22,5 @@ MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, const StringRef &TT) { PrivateGlobalPrefix = "$"; CommentString = "#"; ZeroDirective = "\t.space\t"; - PICJumpTableDirective = "\t.gpword\t"; + GPRel32Directive = "\t.gpword\t"; } |