Commit Graph

19 Commits

Author SHA1 Message Date
Jonas Maebe
db40e1575d + support for handling the tcalo_no_dead_strip flag when targeting LLVM:
add such symbols to the pseudo-arrays llvm.compiler.used or llvm.used
    depending on their nature (fixes compiling Objective-C programs with
    optimization, and keeps the FPC ident in the linked binary)

git-svn-id: trunk@35041 -
2016-12-02 12:33:05 +00:00
Jonas Maebe
a0efde8167 * automatically generate necessary indirect symbols when a new assembler
symbol is defined
   o removed all places where AB_INDIRECT symbols were explicitly generated
   o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
   o for some symbols an indirect symbol is always required (because they are
     dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type

git-svn-id: trunk@34165 -
2016-07-20 20:53:03 +00:00
Jonas Maebe
1cb8c0d00c * specify the def of assembler level symbols defined via
tasmdata.DefineAsmSymbol() and all routines that call it
   o will be used to automatically generate AB_INDIRECT sybols when
     necessary

git-svn-id: trunk@34164 -
2016-07-20 20:52:59 +00:00
Jonas Maebe
04c5d2ee6e * generate indirect symbols for LLVM too
git-svn-id: trunk@33722 -
2016-05-20 20:51:31 +00:00
Jonas Maebe
eefcbaff69 * converted tnodeutils.InsertResourceInfo to the high level typed constant
builder and enabled it for llvm

git-svn-id: trunk@32532 -
2015-11-25 22:25:48 +00:00
Jonas Maebe
682d133e1e * enable generic tllvmnodeutils.InsertResourceTablesTable for llvm
git-svn-id: trunk@32531 -
2015-11-25 22:25:45 +00:00
Jonas Maebe
f8d9e70ec2 * converted tnodeutils.InsertMemorySizes() to the high level typed constant
builder and activated it for llvm

git-svn-id: trunk@31678 -
2015-09-14 16:10:54 +00:00
Jonas Maebe
4b92083006 * converted tnodeutils.InsertRuntimeInitsTablesTable to the high level typed
const builder
   o enabled the routines that use this one for LLVM

git-svn-id: trunk@31652 -
2015-09-12 23:33:38 +00:00
Jonas Maebe
a4ee982269 * converted tnodeutils.InsertInitFinalTable to the high level typed const
builder and enabled it for LLVM

git-svn-id: trunk@31651 -
2015-09-12 23:33:35 +00:00
Jonas Maebe
c813e024ee * support non-section-based threadvars on the LLVM target
git-svn-id: trunk@31645 -
2015-09-12 23:33:14 +00:00
Jonas Maebe
c80fb6a20e * explicitly specify whether an llvm specification is a definition (= locally
defined) or a declaration (external symbol), instead of deriving it from
    from the bind of the tasmsymbol. The reason is that with module-level
    inline assembly, some locally implemented functions (in pure assembler)
    won't have an LLVM IR body

git-svn-id: trunk@31629 -
2015-09-12 23:32:17 +00:00
Jonas Maebe
e2cf90ad8a * add type declarations for structure types in the llvm code so that we can
handle recursive record references (rec= record prec: ^rec)
   o llvm unfortunately does not support recursive references to array types
     or function pointers, so those will currently still result in endless
     recursion when the compiler tries to write them out. Solving those
     will require a lot of typecasting in the generated code

git-svn-id: trunk@30675 -
2015-04-19 21:37:46 +00:00
Jonas Maebe
6677e698cd * record the alignment in taillvmdecl, as it can be different from the
default

git-svn-id: branches/hlcgllvm@28752 -
2014-10-06 20:53:17 +00:00
Jonas Maebe
37009c917b * pass alignment to tnodeutils.insertbsssym()
git-svn-id: branches/hlcgllvm@28751 -
2014-10-06 20:53:14 +00:00
Jonas Maebe
575911dcb0 + support for (section-based) threadvars for LLVM
git-svn-id: branches/hlcgllvm@28352 -
2014-08-10 13:18:46 +00:00
Jonas Maebe
eef6f05697 * specify the asm section type when creating an LLVM declaration
o in case it's a read-only section, mark the data as "constant"

git-svn-id: branches/hlcgllvm@28155 -
2014-07-04 20:30:24 +00:00
Jonas Maebe
7ebb1b813f + basic support infrastructure in the llvm assembler writer to write out
typed constant data
   o llvm declarations now get an extra "initdata" list that contains the
     typed constant data associated with this declaration (if any)

git-svn-id: branches/hlcgllvm@28111 -
2014-07-01 16:30:19 +00:00
Jonas Maebe
b82053ef40 * reworked handling of defined/declared symbols in llvm: we now automatically
generate declarations when external symbols are referred in a taillvm
    instruction
  * added "declared" field to tasmsymbol for llvm to make avoid declaring a
    symbol multiple times (harmless, but unnecessary)
  * all kinds of declarations/definitions are now handled using the new
    taillvmdecl, the old separate types have been removed

git-svn-id: branches/hlcgllvm@27010 -
2014-03-06 21:42:03 +00:00
Jonas Maebe
aa5823a454 * factored out inserting a single bss symbol in ngenutil so it can be
overridden by the llvm target
  * override a bunch of other ngenutil methods with empty stubs for things
    that are not yet supported when targeting llvm

git-svn-id: branches/hlcgllvm@26051 -
2013-11-11 11:16:13 +00:00