llvm-6502/lib/CodeGen/AsmPrinter
Chih-Hung Hsieh dc73dc09f1 Implement target independent TLS compatible with glibc's emutls.c.
The 'common' section TLS is not implemented.
Current C/C++ TLS variables are not placed in common section.
DWARF debug info to get the address of TLS variables is not generated yet.

clang and driver changes in http://reviews.llvm.org/D10524

  Added -femulated-tls flag to select the emulated TLS model,
  which will be used for old targets like Android that do not
  support ELF TLS models.

Added TargetLowering::LowerToTLSEmulatedModel as a target-independent
function to convert a SDNode of TLS variable address to a function call
to __emutls_get_address.

Added into lib/Target/*/*ISelLowering.cpp to call LowerToTLSEmulatedModel
for TLSModel::Emulated. Although all targets supporting ELF TLS models are
enhanced, emulated TLS model has been tested only for Android ELF targets.
Modified AsmPrinter.cpp to print the emutls_v.* and emutls_t.* variables for
emulated TLS variables.
Modified DwarfCompileUnit.cpp to skip some DIE for emulated TLS variabls.

TODO: Add proper DIE for emulated TLS variables.
      Added new unit tests with emulated TLS.

Differential Revision: http://reviews.llvm.org/D10522


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243438 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-28 16:24:05 +00:00
..
AddressPool.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
AddressPool.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ARMException.cpp Use make_range(rbegin(), rend()) to allow foreach loops. NFC. 2015-07-24 21:13:43 +00:00
AsmPrinter.cpp Implement target independent TLS compatible with glibc's emutls.c. 2015-07-28 16:24:05 +00:00
AsmPrinterDwarf.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
AsmPrinterHandler.h Print jump tables before exception tables. 2015-03-09 18:29:12 +00:00
AsmPrinterInlineAsm.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
ByteStreamer.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CMakeLists.txt AsmPrinter: Don't emit empty .debug_loc entries 2015-06-21 16:54:56 +00:00
DbgValueHistoryCalculator.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DbgValueHistoryCalculator.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DebugLocEntry.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DebugLocStream.cpp AsmPrinter: Don't emit empty .debug_loc entries 2015-06-21 16:54:56 +00:00
DebugLocStream.h AsmPrinter: Don't emit empty .debug_loc entries 2015-06-21 16:54:56 +00:00
DIE.cpp Redirect pointerSize query to the TargetMachine in ASMPrinter 2015-07-16 05:59:25 +00:00
DIEHash.cpp AsmPrinter: Use an intrusively linked list for DIE::Children 2015-06-25 23:52:10 +00:00
DIEHash.h AsmPrinter: Convert DIE::Values to a linked list 2015-06-25 23:46:41 +00:00
DwarfAccelTable.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
DwarfAccelTable.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DwarfCFIException.cpp Remove DataLayout from TargetLoweringObjectFile, redirect to Module 2015-07-16 06:04:17 +00:00
DwarfCompileUnit.cpp Implement target independent TLS compatible with glibc's emutls.c. 2015-07-28 16:24:05 +00:00
DwarfCompileUnit.h Revert "[DWARF] Fix debug info generation for function static variables, typedefs, and records" 2015-07-01 18:07:16 +00:00
DwarfDebug.cpp DI: Strengthen block-byref cast to DIDerivedType, NFC 2015-07-24 18:58:32 +00:00
DwarfDebug.h Add a "debugger tuning" concept that allows us to fine-tune how we 2015-07-15 22:04:54 +00:00
DwarfException.h [AsmPrinter] Hide implementation details 2015-07-01 16:18:16 +00:00
DwarfExpression.cpp Revert "[DWARF] Fix a few corner cases in expression emission" 2015-06-09 18:01:51 +00:00
DwarfExpression.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DwarfFile.cpp AsmPrinter: Use an intrusively linked list for DIE::Children 2015-06-25 23:52:10 +00:00
DwarfFile.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DwarfStringPool.cpp AsmPrinter: Avoid creating symbols in DwarfStringPool 2015-05-24 16:58:59 +00:00
DwarfStringPool.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DwarfUnit.cpp Use make_range(rbegin(), rend()) to allow foreach loops. NFC. 2015-07-24 21:13:43 +00:00
DwarfUnit.h Debug Info: Add basic support for external types references. 2015-07-15 17:01:41 +00:00
EHStreamer.cpp Use make_range(rbegin(), rend()) to allow foreach loops. NFC. 2015-07-24 21:13:43 +00:00
EHStreamer.h [AsmPrinter] Hide implementation details 2015-07-01 16:18:16 +00:00
ErlangGCPrinter.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
LLVMBuild.txt Add proper dependencies to LLVMBuild.txt in llvm/lib. 2013-12-10 05:39:34 +00:00
Makefile
OcamlGCPrinter.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
WinCodeViewLineTables.cpp [CodeView] Add support for emitting column information 2015-07-09 00:19:51 +00:00
WinCodeViewLineTables.h [CodeView] Add support for emitting column information 2015-07-09 00:19:51 +00:00
WinException.cpp [CodeGen] Force emission of personality directive if explicitly specified 2015-07-14 19:22:51 +00:00
WinException.h [AsmPrinter] Hide implementation details 2015-07-01 16:18:16 +00:00