llvm-6502/include/llvm/Support
Bill Schmidt d7802bf0dd This patch introduces initial-exec model support for thread-local storage
on 64-bit PowerPC ELF.

The patch includes code to handle external assembly and MC output with the
integrated assembler.  It intentionally does not support the "old" JIT.

For the initial-exec TLS model, the ABI requires the following to calculate
the address of external thread-local variable x:

 Code sequence            Relocation                  Symbol
  ld 9,x@got@tprel(2)      R_PPC64_GOT_TPREL16_DS      x
  add 9,9,x@tls            R_PPC64_TLS                 x

The register 9 is arbitrary here.  The linker will replace x@got@tprel
with the offset relative to the thread pointer to the generated GOT
entry for symbol x.  It will replace x@tls with the thread-pointer
register (13).

The two test cases verify correct assembly output and relocation output
as just described.

PowerPC-specific selection node variants are added for the two
instructions above:  LD_GOT_TPREL and ADD_TLS.  These are inserted
when an initial-exec global variable is encountered by
PPCTargetLowering::LowerGlobalTLSAddress(), and later lowered to
machine instructions LDgotTPREL and ADD8TLS.  LDgotTPREL is a pseudo
that uses the same LDrs support added for medium code model's LDtocL,
with a different relocation type.

The rest of the processing is straightforward.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 16:18:08 +00:00
..
AIXDataTypesFix.h
AlignOf.h xlc supports __attribute__((aligned(x))), use it. 2012-10-31 00:54:26 +00:00
Allocator.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Atomic.h
BlockFrequency.h
BranchProbability.h
CallSite.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Capacity.h
Casting.h Casting.h: Automatically handle isa<Base>(Derived). 2012-10-11 23:30:40 +00:00
CFG.h
circular_raw_ostream.h Use empty parens for empty function parameter list instead of '(void)'. 2012-11-15 16:51:49 +00:00
CodeGen.h
COFF.h
CommandLine.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Compiler.h Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES. 2012-11-30 11:45:22 +00:00
ConstantFolder.h
ConstantRange.h
CrashRecoveryContext.h
DataExtractor.h Add a relocation visitor to lib object. This works via caching relocated 2012-11-07 23:22:07 +00:00
DataFlow.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
DataStream.h
DataTypes.h.cmake
DataTypes.h.in
Debug.h
DebugLoc.h
Disassembler.h
DOTGraphTraits.h
Dwarf.h Add constant definitions for fission dwarf attributes, forms, etc. 2012-11-16 23:04:31 +00:00
DynamicLibrary.h
ELF.h This patch introduces initial-exec model support for thread-local storage 2012-12-04 16:18:08 +00:00
Endian.h
Errno.h
ErrorHandling.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
FEnv.h
FileOutputBuffer.h [Support] Make FileOutputBuffer work on Windows. 2012-12-03 22:09:52 +00:00
FileSystem.h Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES. 2012-11-30 11:45:22 +00:00
FileUtilities.h
Format.h
FormattedStream.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
GCOV.h
GetElementPtrTypeIterator.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
GraphWriter.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Host.h
IncludeFile.h
InstIterator.h
IntegersSubset.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
IntegersSubsetMapping.h
IRReader.h
LeakDetector.h
LEB128.h Fix a couple include directives that used angle brackets for llvm files. 2012-09-15 18:41:37 +00:00
LICENSE.TXT
Locale.h
LockFileManager.h Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. 2012-09-16 21:37:56 +00:00
MachO.h
ManagedStatic.h
MathExtras.h
Memory.h Correcting enum values mentioned in comments. 2012-10-12 21:47:49 +00:00
MemoryBuffer.h Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. 2012-09-16 21:37:56 +00:00
MemoryObject.h
Mutex.h Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. 2012-09-16 21:37:56 +00:00
MutexGuard.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 06:31:17 +00:00
NoFolder.h
OutputBuffer.h
PassNameParser.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Path.h
PathV1.h Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 2012-09-27 10:14:43 +00:00
PathV2.h
PatternMatch.h
PluginLoader.h
PointerLikeTypeTraits.h
PredIteratorCache.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
PrettyStackTrace.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
Process.h
Program.h Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. 2012-09-16 21:37:56 +00:00
raw_os_ostream.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
raw_ostream.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
Recycler.h
RecyclingAllocator.h
Regex.h Add backreference matching capabilities to Support/Regex, with 2012-11-28 19:00:02 +00:00
Registry.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 06:31:17 +00:00
RegistryParser.h
RWMutex.h Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. 2012-09-16 21:37:56 +00:00
SaveAndRestore.h
Signals.h
SMLoc.h
Solaris.h
SourceMgr.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
StreamableMemoryObject.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
StringPool.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
SwapByteOrder.h
system_error.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
SystemUtils.h
TargetFolder.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
TargetRegistry.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
TargetSelect.h
Threading.h
ThreadLocal.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Timer.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
TimeValue.h Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 2012-09-27 10:14:43 +00:00
ToolOutputFile.h
type_traits.h
Valgrind.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ValueHandle.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 06:31:17 +00:00
Win64EH.h
YAMLParser.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00