llvm-6502/include/llvm
Ulrich Weigand 7a34599db0 [PowerPC] Revert r185476 and fix up TLS variant kinds
In the commit message to r185476 I wrote:

>The PowerPC-specific modifiers VK_PPC_TLSGD and VK_PPC_TLSLD
>correspond exactly to the generic modifiers VK_TLSGD and VK_TLSLD.
>This causes some confusion with the asm parser, since VK_PPC_TLSGD
>is output as @tlsgd, which is then read back in as VK_TLSGD.
>
>To avoid this confusion, this patch removes the PowerPC-specific
>modifiers and uses the generic modifiers throughout.  (The only
>drawback is that the generic modifiers are printed in upper case
>while the usual convention on PowerPC is to use lower-case modifiers.
>But this is just a cosmetic issue.)

This was unfortunately incorrect, there is is fact another,
serious drawback to using the default VK_TLSLD/VK_TLSGD
variant kinds: using these causes ELFObjectWriter::RelocNeedsGOT
to return true, which in turn causes the ELFObjectWriter to emit
an undefined reference to _GLOBAL_OFFSET_TABLE_.

This is a problem on powerpc64, because it uses the TOC instead
of the GOT, and the linker does not provide _GLOBAL_OFFSET_TABLE_,
so the symbol remains undefined.  This means shared libraries
using TLS built with the integrated assembler are currently
broken.

While the whole RelocNeedsGOT / _GLOBAL_OFFSET_TABLE_ situation
probably ought to be properly fixed at some point, for now I'm
simply reverting the r185476 commit.  Now this in turn exposes
the breakage of handling @tlsgd/@tlsld in the asm parser that
this check-in was originally intended to fix.

To avoid this regression, I'm also adding a different fix for
this problem: while common code now parses @tlsgd as VK_TLSGD,
a special hack in the asm parser translates this code to the
platform-specific VK_PPC_TLSGD that the back-end now expects.
While this is not really pretty, it's self-contained and
shouldn't hurt anything else for now.  One the underlying
problem is fixed, this hack can be reverted again.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185945 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09 16:41:09 +00:00
..
ADT Revert r185852. 2013-07-08 20:27:34 +00:00
Analysis Fix a SCEV update problem. 2013-07-08 17:33:13 +00:00
Assembly Enable *BasicBlockPass::createPrinterPass() 2013-02-08 23:37:41 +00:00
Bitcode Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
CodeGen Remove dead function. 2013-07-05 23:04:55 +00:00
Config Find xdot or xdot.py. 2013-07-08 20:24:54 +00:00
DebugInfo llvm-dwarfdump: Add support for dumping the .debug_loc section 2013-06-19 21:37:13 +00:00
ExecutionEngine Revising the MCJIT ObjectCache interface to allow subclasses to avoid retaining references to returned objects 2013-06-28 21:40:16 +00:00
IR Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset both the BB and the insert point inside the BB. 2013-07-08 23:27:43 +00:00
IRReader Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
MC [PowerPC] Revert r185476 and fix up TLS variant kinds 2013-07-09 16:41:09 +00:00
Object Add missing getters. They will be used in llvm-ar. 2013-07-09 12:49:24 +00:00
Option Merge changes to clang's Driver code into LLVM's Option library 2013-06-13 18:12:12 +00:00
Support Revert r185852. 2013-07-08 20:27:34 +00:00
TableGen Fix up some asserts that are within an if statement. This removes the need 2013-07-01 23:42:53 +00:00
Target [SystemZ] Remove no-op MVCs 2013-07-05 14:38:48 +00:00
Transforms Remove limitation on DebugIR that made it require existing debug metadata. 2013-06-28 19:05:23 +00:00
AutoUpgrade.h remove autoupgrade support for really old-style debug info intrinsics. 2011-11-27 06:18:33 +00:00
CMakeLists.txt Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
DebugInfo.h Revert "DebugInfo: remove unused helper function getDICompositeType." 2013-07-09 00:16:56 +00:00
DIBuilder.h Rename DIBuilder::createNullPtrType to createUnspecifiedType and introduce 2013-06-27 22:50:59 +00:00
GVMaterializer.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
InitializePasses.h Remove the simplify-libcalls pass (finally) 2013-06-20 19:48:07 +00:00
InstVisitor.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
LinkAllIR.h Rename LinkAllVMCore.h to LinkAllIR.h since VMCore directory was renamed to IR. 2013-01-10 21:55:02 +00:00
LinkAllPasses.h Remove the simplify-libcalls pass (finally) 2013-06-20 19:48:07 +00:00
Linker.h Fix a performance bug in the Linker. 2013-05-04 05:05:18 +00:00
Pass.h moves doInitialization and doFinalization to the Pass class and removes some unreachable code in MachineModuleInfo 2012-12-03 21:56:57 +00:00
PassAnalysisSupport.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
PassManager.h This patch breaks up Wrap.h so that it does not have to include all of 2013-05-01 20:59:00 +00:00
PassManagers.h Use a DenseMap instead of a std::map for AnalysisID -> Pass* maps. This reduces the pass-manager overhead from FPPassManager::runOnFunction() by about 10%. 2013-02-26 01:31:59 +00:00
PassRegistry.h This patch breaks up Wrap.h so that it does not have to include all of 2013-05-01 20:59:00 +00:00
PassSupport.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00