Commit Graph

258 Commits

Author SHA1 Message Date
florian
8971103a00 * use bit_set_reg_reg also to clear single bits in thlcgobj.a_load_regconst_subsetref_intern 2024-03-26 14:46:01 +01:00
florian
ac150e58c8 * thlcgobj.a_load_regconst_subsetref_intern uses a_bit_set_reg_reg if applicable 2024-03-25 00:01:24 +01:00
J. Gareth "Curious Kit" Moreton
2b7df4237b * nf_pass1_done, nf_error, nf_processing and nf_do_not_execute
have been moved to a new "transientflags" node field that
    isn't stored in PPU files
2024-03-24 18:14:49 +00:00
florian
a75e453c30 + thlcgobj.location_force_mem now supports LOC_JUMP as well, resolves #40650 2024-02-19 22:22:12 +01:00
Jonas Maebe
49cb7b2564 LLVM: use llvm.dbg.declare instead of llvm.dbg.addr for variable declarations
Even though it's supposedly deprecated, clang also still uses it and without
the declaration ranges of local variables are sometimes cut off
2023-12-06 22:57:16 +01:00
Nikolay Nikolov
5486182f56 + introduced thlcgobj.a_jmp_always_pascal_goto - same as .a_jmp_always, but generated by a pascal goto statement 2023-10-22 04:12:59 +03:00
Nikolay Nikolov
9b8af14f47 + introduced [hl]cg.a_label_pascal_goto_target. It is similar to [hl]cg.a_label
and is called by the code generator, when the label generated is the result of
  a Pascal label.
2023-06-04 05:11:07 +03:00
Jonas Maebe
ee0ad3ff86 thlcgobj.g_undefined_ok: new method
Specify that a register's contents may be undefined because of previous
operations (e.g. shifting by more bits than the register has, whose result
depends on the target architecture), but that the code generator will
later on ensure that if this is the case, that result will be overwritten/
masked.
2023-01-20 21:07:18 +01:00
Jonas Maebe
f51798e449 High level codegen: set MM register type for vectors 2022-09-16 11:21:05 +02:00
florian
5afd809e88 + handle LOC_FLAGS in thlcgobj.location_force_mem, resolves #39292 2022-08-08 23:14:56 +02:00
Jonas Maebe
a76038e1d1 hlcgobj: new getlocal and recordnewsymloc methods
Call hlcg.getlocal instead of tg.getlocal when used for actual parameters/local
variables. Has an extra tsym parameter, which will enable the LLVM backend to
insert debug information.

Call hlcg.recordnewsymloc when the location of a (local/para) symbol changes,
so debug info tracking can be updated (only done for LLVM currently)
2022-06-04 22:26:40 +02:00
J. Gareth "Curious Kit" Moreton
6f24c8b4ef * x86: Code generation fixes where FLAGS
register is not properly allocated.
2022-04-27 20:46:32 +00:00
florian
33db5200e6 * building for LLVM fixed 2022-02-28 22:24:05 +01:00
florian
6f749cf43d * first part to fix #39603 2022-02-27 23:20:07 +01:00
ccrause
665c1b3966 Move member variable "section" to tprocdef. Type of "section" to agree with symansistr define. 2022-02-22 20:51:32 +00:00
ccrause
738a0a35de Add section directive for subroutines for embedded and freertos systems. 2022-02-22 20:51:32 +00:00
florian
2a93e65511 * seperator => separator 2022-01-02 13:12:33 +01:00
J. Gareth "Curious Kit" Moreton
2dc0995067 - Bug fix to new ADD/SUB optimisation where conditions are concerned
- Register allocation fixes for overflow checks
2021-11-17 20:18:57 +00:00
Yuriy Sydorov
b78761efd3 * Removed obsolete OLDREGVARS ifdefs. 2021-11-02 17:08:08 +02:00
Nikolay Nikolov
3c58f26e83 * thlcgwasm.g_checkexceptions renamed .g_maybe_checkforexceptions, added also as
an empty virtual method in thlcgobj and modified the WebAssembly
  implementation, so that it can be called from any exceptions mode (so it
  emits no code in exception modes that don't require it, instead of generating
  an internal error). This will allow .g_maybe_checkforexceptions to be called
  from the generic parts of the code generator, after calls to systemprocs that
  could raise an exceptions.
2021-10-05 17:54:35 +03:00
florian
8efae66956 * we cannot do SSA during partial writes to arrays which span multiple registers, resolves #39325 2021-09-01 09:31:50 +02:00
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