LLVM backend for 6502
Go to file
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
autoconf Fix a pasto. 2012-11-19 19:31:02 +00:00
bindings [python] Add markup option to disassembler 2012-12-01 21:57:30 +00:00
cmake Removing SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG 2012-11-26 02:02:08 +00:00
docs Update release notes for NVPTX 2012-12-04 16:11:51 +00:00
examples Sort the #include lines of the examples/... tree. 2012-12-04 10:16:57 +00:00
include This patch introduces initial-exec model support for thread-local storage 2012-12-04 16:18:08 +00:00
lib This patch introduces initial-exec model support for thread-local storage 2012-12-04 16:18:08 +00:00
projects Clean up the sample include orderings, not that it really matters... 2012-12-04 10:46:21 +00:00
runtime
test This patch introduces initial-exec model support for thread-local storage 2012-12-04 16:18:08 +00:00
tools Sort the #include lines for tools/... 2012-12-04 10:44:52 +00:00
unittests Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
utils KillTheDoctor.cpp: Restore Win32 SDK headers before r169251. 2012-12-04 11:34:27 +00:00
.arcconfig Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool. 2012-12-01 12:07:58 +00:00
.gitignore
CMakeLists.txt Kick off 3.3 cycle for LLVM trunk. 2012-11-17 22:01:08 +00:00
CODE_OWNERS.TXT clarify that this isn't lld. 2012-12-03 16:08:32 +00:00
configure Fix a pasto. 2012-11-19 19:31:02 +00:00
CREDITS.TXT Update my email address. 2012-11-29 21:17:26 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
README.txt Test commit. 2012-11-29 16:19:11 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.