Commit Graph

226 Commits

Author SHA1 Message Date
florian
b352449eac * Xtensa: fix flag handling: B0 is considered as default flags
git-svn-id: trunk@44687 -
2020-04-11 13:18:47 +00:00
florian
3de193467d * reverted r44119
git-svn-id: trunk@44123 -
2020-02-06 20:24:59 +00:00
florian
2d47013cd1 * patch by J. Gareth Moreton: fixes internal error 200405231 with inline, resolves #35590
git-svn-id: trunk@44119 -
2020-02-05 20:35:03 +00:00
yury
1b3a3a7983 * Removed lot of unused local vars. It is useful to turn on the notes in options. :)
git-svn-id: trunk@44053 -
2020-01-28 18:45:33 +00:00
florian
b7c6e01b03 * cleaning up tcgsize: it makes no sense to declare every combination and type
the different vector types must be either handled in the high level cg or
    by using the shuffle parameter

git-svn-id: trunk@43860 -
2020-01-04 21:54:53 +00:00
Jonas Maebe
1e3f72403e * renamed getintparaloc to getcgtempparaloc
o it can be used for more than integer parameters

git-svn-id: trunk@43781 -
2019-12-24 22:12:25 +00:00
florian
a20209e691 + tf_init_final_units_by_calls
* arm-embedded generates direct calls for unit init/final now as well

git-svn-id: trunk@43771 -
2019-12-24 16:14:30 +00:00
florian
3889529e45 * unified internalerror, resolves #36378
git-svn-id: trunk@43610 -
2019-11-29 21:06:12 +00:00
Jonas Maebe
ec227bb759 * fixed safecall for non-LLVM after r43578
git-svn-id: trunk@43580 -
2019-11-24 21:26:22 +00:00
Jonas Maebe
e775ecdc43 * cleaned up safecall support: use a hidden localvarsym instead of result
register hacking
   o this also allowed fixing/adding safecall support for LLVM

git-svn-id: trunk@43578 -
2019-11-24 20:23:22 +00:00
Jonas Maebe
e56b58c2b0 * factored out checks whether a procdef's symbol needs to be global, and
the generation of the procdef's asmsymbols
   o also removed unnecessary definition of procdef alias symbols for Darwin
     (they are already defined in ncgutil.alloc_proc_symbol)

git-svn-id: trunk@42341 -
2019-07-07 21:33:47 +00:00
Jonas Maebe
3fee990218 * on Mach-O, PECOFF and ELF platforms, write local symbols as hidden/
private_extern (or plain global in case of PECOFF, as the effect is
    the same there): visible across object files, but they become local
    when linked into a binary/library. This enables cross-unit inlining
    of functions accessig implementation-only symbols.

git-svn-id: trunk@42340 -
2019-07-07 21:33:43 +00:00
Jonas Maebe
c262c5dbc9 * synchronised with trunk till r42256
git-svn-id: branches/debug_eh@42257 -
2019-06-20 17:21:34 +00:00
florian
749c4d4e47 + keep (certain) arrays in registers if they are used with constants indices only
git-svn-id: trunk@42239 -
2019-06-16 21:29:48 +00:00
Jonas Maebe
faf75095cd * synchronised with trunk till r42189
git-svn-id: branches/debug_eh@42190 -
2019-06-07 18:24:38 +00:00
Jonas Maebe
322a717c44 * support for handling subsetrefs with bitlen > AIntBits in a_load_subsetref_reg() and
a_load_const/reg_subsetref() (needed for handling 32 bit platforms using a purely
    high level code generator like LLVM's, and may also improve the situation for
    16 bit platforms)
   o can probably be optimized to split them into parts that cover partial word loads
     and complete word loads (to reduce useless merging)

git-svn-id: trunk@42165 -
2019-06-02 18:32:58 +00:00
Jonas Maebe
9e9a982bfe * synchronised with trunk till r42095
git-svn-id: branches/debug_eh@42096 -
2019-05-18 18:43:51 +00:00
Jonas Maebe
47812c8a3d * don't double-define function aliases for Darwin defined via ".set" directive
git-svn-id: trunk@42095 -
2019-05-18 18:41:38 +00:00
Jonas Maebe
1b6425176b * synchronised with trunk till r42049
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
a0f850d57f * synchronised with trunk till r41885
git-svn-id: branches/debug_eh@41886 -
2019-04-16 16:20:44 +00:00
Jonas Maebe
b9ddddf9b1 * use ".set" for aliasing global symbols on Darwin, instead of declaring
symbols after each other
   o removed the .reference hack that was used previously

git-svn-id: trunk@41885 -
2019-04-16 16:11:54 +00:00
Jonas Maebe
d93c05a90c * synchronised with trunk till r41207
git-svn-id: branches/debug_eh@41208 -
2019-02-03 21:05:37 +00:00
Jonas Maebe
1abea6451c * fixed thlcgobj.g_rangecheck() for cpuhighleveltarget when targetting a
cpu32bitalu

git-svn-id: trunk@41206 -
2019-02-03 21:01:08 +00:00
Jonas Maebe
a0d796e98d * synchronised with trunk till r41159
git-svn-id: branches/debug_eh@41160 -
2019-02-01 17:01:54 +00:00
Jonas Maebe
04d295f186 * first step towards supporting 32 bit targets with the LLVM code generator:
use the generic code in more cases when cpuhighleveltarget is defined

git-svn-id: trunk@41133 -
2019-01-29 21:39:09 +00:00
Jonas Maebe
473fef315d * synchronised with trunk till r40732
git-svn-id: branches/debug_eh@40733 -
2019-01-01 16:24:18 +00:00
Jonas Maebe
4d03f3a65e * fixed LLVM memory leaks
git-svn-id: trunk@40732 -
2019-01-01 16:22:31 +00:00
Jonas Maebe
c7d701d117 * synchronised with trunk till r40038
git-svn-id: branches/debug_eh@40643 -
2018-12-25 15:38:57 +00:00
Jonas Maebe
f754978540 * handle constructor function results that have been migrated to the
parentfpstruct the same as regular function results (see r32687)

git-svn-id: trunk@40641 -
2018-12-25 15:36:24 +00:00
Jonas Maebe
882d676bc9 * synchronised with trunk till r40635
git-svn-id: branches/debug_eh@40636 -
2018-12-24 22:12:19 +00:00
Jonas Maebe
377d4e1b58 * make the size parameter of thlcgobj.location_force_mmregscalar() a
var-parameter, as the size sometimes gets changed in this routine and
    high level code generators don't use the location.size but the def

git-svn-id: trunk@40633 -
2018-12-24 22:10:02 +00:00
Jonas Maebe
440026bb25 * synchronised with trunk till r40503
git-svn-id: branches/debug_eh@40504 -
2018-12-08 15:33:36 +00:00
Jonas Maebe
3b7efb5123 * only free the temp holding the function result after we've loaded it into
the function return register (so we won't load from an already freed
    temp once we emit lifetime info for temps on LLVM)

git-svn-id: trunk@40501 -
2018-12-08 15:31:48 +00:00
Jonas Maebe
4cd6f59bc3 * changed create_hlcodegen into a procvar, so that we don't have to insert
hlcgllvm in the uses clause of every unit that calls create_hlcodegen
   o prevents dependency cycles that can cause llvm codegen units to init
     before the cpu variants, which is bad since the llvm versions have to
     override the cpu variants in their init code (+ added checks in the
     init code that they are in fact initialised later)

git-svn-id: branches/debug_eh@40410 -
2018-11-29 21:31:15 +00:00
Jonas Maebe
413a3599c1 * thlcgobj.g_unreachable() dummy implementation + llvm override
git-svn-id: trunk@40382 -
2018-11-28 19:23:22 +00:00
Jonas Maebe
09b6306f02 - removed outdated comment after r40373
git-svn-id: trunk@40375 -
2018-11-26 22:30:01 +00:00
Jonas Maebe
9a157a7749 * don't overwrite the alignment of locals set by the temp manager with the
standard alignment for the type (the maximum alignment for locals may
    be less, and it's set correctly by the temp manager)

git-svn-id: trunk@40373 -
2018-11-26 22:27:31 +00:00
Jonas Maebe
3b9f5a5e96 * moved finalization of code generator temps to a node, so it can be getcopy'd
(needed for LLVM, where we need two copies of the finally code: one in case
     an exception occurs, and one in case none is raised)
   o also first finalize parameters and only then code generator temps, since
     in theory the former could create more of the latter

git-svn-id: trunk@40345 -
2018-11-17 22:38:36 +00:00
Jonas Maebe
d69ad8fa41 * removed temppos field again from parameter locations: they're not allocated
by the temp manager of the current procedure

git-svn-id: trunk@38858 -
2018-04-27 19:18:55 +00:00
Jonas Maebe
4686f61002 * keep track of the temp position separately from the offset in references,
so that they can still be freed after the reference has been changed
    (e.g. in case of array indexing or record field accesses) (mantis #33628)

git-svn-id: trunk@38814 -
2018-04-22 17:03:16 +00:00
Jonas Maebe
3e8cd7d4c9 * after making a copy of a vo_has_local_copy parameter, only release
the old location as a temp in case it was a reference

git-svn-id: trunk@38813 -
2018-04-22 17:03:11 +00:00
florian
75e03a7e62 * avoid unneeded the generation of un-needed shift instructions thlcgobj.in a_load_subsetreg_reg
git-svn-id: trunk@37374 -
2017-10-01 16:13:22 +00:00
florian
b948a0738c * unified internalerror
* cosmetics

git-svn-id: trunk@36944 -
2017-08-20 15:21:46 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
Jonas Maebe
b86f2d7e3c * only initialize global regvars in unit and main program init code
(bug in r35461)

git-svn-id: trunk@35462 -
2017-02-21 07:37:15 +00:00
Jonas Maebe
cadf177a93 * fixed bugs in r33737: that revision was supposed to only move
code from one unit to another, but in splitting some methods
    I made a couple of mistakes :/ (causing global variables to be
    initialised three times)

git-svn-id: trunk@35461 -
2017-02-20 22:15:34 +00:00
florian
1e374df5b8 * correctly calculate the bit mask in thlcgobj.a_load_regconst_subsetreg_intern, resolves #31042
* convert immediates on x86 always to 32 (x86-64, i386) or 16 bit (i8086) signed values

git-svn-id: trunk@35082 -
2016-12-07 20:08:22 +00:00
Jonas Maebe
f26ed10ba1 * same as r27223 for hlcgobj (fixes webtbs/tw25895 for llvm)
git-svn-id: trunk@35043 -
2016-12-02 17:45:09 +00:00
Jonas Maebe
a25ebbba3e + added volatility information to all memory references
o separate information for reading and writing, because e.g. in a
     try-block, only the writes to local variables and parameters are
     volatile (they have to be committed immediately in case the next
     instruction causes an exception)
   o for now, only references to absolute memory addresses are marked
     as volatile
   o the volatily information is (should be) properly maintained throughout
     all code generators for all archictures with this patch
   o no optimizers or other compiler infrastructure uses the volatility
     information yet
   o this functionality is not (yet) exposed at the language level, it
     is only for internal code generator use right now

git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00