Commit Graph

237 Commits

Author SHA1 Message Date
Yuriy Sydorov
136f042972 * It is still needed to release the temp allocated for the result of an assembler function if the result is not referenced. This fixes some EXTDEBUG warnings. 2021-08-06 21:43:10 +03:00
nickysn
780ded903a * synchronized with trunk
git-svn-id: branches/wasm@48225 -
2021-01-19 23:01:55 +00:00
pierre
dc799a9d49 Fix clearing of single type register variable in initialize_regvars method for ARM cpu (with -Ooregvar)
git-svn-id: trunk@48186 -
2021-01-18 23:29:24 +00:00
nickysn
8f059a6b8a * synchronized with trunk
git-svn-id: branches/wasm@47106 -
2020-10-14 02:41:25 +00:00
florian
637976e83f * patch by Marģers to unify internal error numbers, resolves #37888
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
nickysn
60762dbfee * use the .set directive for procedure aliases
git-svn-id: branches/wasm@46982 -
2020-09-28 02:54:37 +00:00
florian
61da70bb72 * do not copy unused paravarsyms
git-svn-id: trunk@46954 -
2020-09-25 20:06:26 +00:00
florian
b7ef93030a * set mm register subreg properly when cleaning them with xor
git-svn-id: trunk@45721 -
2020-07-02 21:14:43 +00:00
Jonas Maebe
aa243faab8 * do not load unused parameters, as their localloc has not been set (and
there is no point in doing so if it were)
   o fixes compilation of RTL with LLVM/AArch64

git-svn-id: trunk@45478 -
2020-05-23 19:03:14 +00:00
yury
9d1c814387 * Added the thlcgobj.a_load_undefined_cgpara() method to pass an undefined value as a parameter to a routine. The generic version passes the 0/nil value if the parameter's location is not a register.
* Use a_load_undefined_cgpara() to load values for unused parameters.

git-svn-id: trunk@45439 -
2020-05-19 14:14:16 +00:00
nickysn
0f6ab0de17 * handle LOC_(C)SUBSETREG/REF in second_NegNot_assign
* changed the way OP_NEG and OP_NOT are handled in op_reg_ref, in order to be
  consistent with op_reg_reg
* introduced op_reg,op_ref,op_subsetreg,op_subsetref and op_loc for the unary
  operations only (OP_NEG,OP_NOT)

git-svn-id: trunk@45302 -
2020-05-07 02:43:02 +00:00
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