1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/include/llvm
Ulrich Weigand b664c03f18 [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.

llvm-svn: 185945
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
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
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
CMakeLists.txt
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
InitializePasses.h Remove the simplify-libcalls pass (finally) 2013-06-20 19:48:07 +00:00
InstVisitor.h
LinkAllIR.h
LinkAllPasses.h Remove the simplify-libcalls pass (finally) 2013-06-20 19:48:07 +00:00
Linker.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassManagers.h
PassRegistry.h
PassSupport.h