Commit Graph

467 Commits

Author SHA1 Message Date
florian
b2f6214b33 + a_bit_scan_reg_reg gets a flag if src cannot be zero: this simplifies the generated code 2025-02-08 14:27:48 +01:00
Sven/Sarah Barth
366acce9ef * fix compiling binaries on JVM: the entries list contains pinitfinalentry values, not tused_unit 2025-01-11 15:35:58 +01:00
florian
1de3aba4e3 * few types fixed 2024-04-26 22:54:27 +02:00
Michaël Van Canneyt
2ba04dbd13 * generate init_final table from actual uses clauses 2024-03-05 07:56:14 +00:00
J. Gareth "Curious Kit" Moreton
179fc5848b * Flags specific to TArrayConstructorNode have been moved to their own field 2024-03-02 21:31:21 +01:00
florian
a401898139 * spelling fixes 2022-08-04 23:01:35 +02:00
Sven/Sarah Barth
7de854ef1e + add method register_implemented_interface to tobjectdef which registers an implemented interface and - if desired - also initializes the GUID related fields of the objectdef
* use that method in all locations outside symdef that add add an implemented interface

Based on work by Blaise.ru
2022-05-26 21:43:37 +02:00
Sven/Sarah Barth
7f3a5eb9ab * extend tabstractprocdef.getcopyas by a parameter to control whether the copy should be registered or not 2022-05-26 21:42:59 +02:00
Pierre Muller
5acd7a7b83 Rename tsymtable.insert and delete methods to insertsym ands deletesym 2022-05-03 23:00:28 +02:00
florian
27fb9086aa * cleanup: cs_opt_loopunroll is a generic optimization for a long time already 2022-03-08 23:03:18 +01:00
Pierre Muller
abee4d46b6 Ignore NR_DEFAULTFLAGS for ait_regalloc, because there is no default flags for JVM 2022-01-05 16:41:22 +00:00
florian
6404478ea4 * cleanup of VER3_0 defines 2021-11-17 22:19:57 +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
florian
ff3acfb8cd * cleanup of 2.7.0 defines 2021-10-31 13:20:28 +01:00
Jonas Maebe
803779002d * the new constant string arraydefs are also implicit pointers types for JVM
git-svn-id: trunk@48833 -
2021-02-27 19:30:37 +00:00
Jonas Maebe
ab0531f0ce * fixed JVM stack height calculation after calls returning an
implicit pointer tpe

git-svn-id: trunk@48832 -
2021-02-27 19:30:34 +00:00
yury
75491ae21c * Removed/ifdefed the assigned and unused variables.
git-svn-id: trunk@48391 -
2021-01-24 13:58:17 +00:00
yury
0a021be803 * Corrected visibility of overridden methods.
git-svn-id: trunk@48385 -
2021-01-24 12:41:12 +00:00
yury
64c586b86d * Removed/ifdefed lots of unused variables.
git-svn-id: trunk@48384 -
2021-01-24 12:24:01 +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
Jonas Maebe
453bfcd370 * emit the correct declaration for procdefs used to force a procname in LLVM
o fixes lazarus startup on macOS/AArch64 when compiled with the LLVM cg

git-svn-id: trunk@46675 -
2020-08-23 21:11:09 +00:00
yury
6e777d8967 * ait_comment,ait_regalloc,ait_tempalloc,ait_varloc instructions produce only comments in the external assembler output. Moved handling of these instructions to TExternalAssembler.WriteComments().
This eliminates code duplication and improves maintainability.

git-svn-id: trunk@46550 -
2020-08-22 19:53:39 +00:00
Jonas Maebe
eb7ba1690e * mark all external assemblers using an LLVM tool using af_llvm
+ added support for constructing target triplets
  * pass "-target triplet" when using an LLVM assembler
   o removed no longer needed $DARWINVERSION and $ARCH parameters
  * consistently use as_clang_gas when clang is used to assembler GAS-style
    assembly, and rename as_llcm_clang to as_clang_llvm (for consistency)
  * support pipe assembling when using clang on *nix in all cases

git-svn-id: trunk@45807 -
2020-07-19 14:30:35 +00:00
florian
84a1f614d9 * fix several double ;
git-svn-id: trunk@45488 -
2020-05-24 17:52:09 +00:00
yury
627fcb4354 * Do not use the LOC_VOID location to indicate unused parameters.
* Added the tprocdef.parentfpsym property. Set parentfpsym.varstate to vs_read instead of using the pio_needs_parentfp flag.
* Replaced tcgcallparanode.push_zero_sized_value_para by tparamanager.has_strict_proc_signature.

git-svn-id: trunk@45454 -
2020-05-21 09:36:40 +00:00
nickysn
a8fe46c0f5 + introduced labelmaxlen in tasminfo and added code in ReplaceForbiddenAsmSymbolChars that limits the
output label to that length

git-svn-id: branches/z80@45066 -
2020-04-25 12:59:25 +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
svenbarth
bf5d75e594 * move the common sequence to build a VMT for an objectdef into a separate procedure (based on a patch by Blaise.ru)
git-svn-id: trunk@43674 -
2019-12-11 22:42:53 +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
a051b8d225 - remmoved doregister parameter from t*sym constructors, as the registration
is handled automatically nowadays

git-svn-id: trunk@42998 -
2019-09-14 17:30:45 +00:00
florian
69786ffe73 somehow committing went wrong, second part of last commit:
+ AArch64: support for vX.8b/vX.16b register names
+ support for more than 256 registers in the register dat files
- removed totherregisterset
+ AArch64: use vmov to load immediates if possible
+ AArch64: use eor to clear mm registers

git-svn-id: trunk@42917 -
2019-09-03 21:07:33 +00:00
pierre
828a248287 Systematically include fpcdefs.inc at sart of all units used by compiler
git-svn-id: trunk@42322 -
2019-07-03 13:35:05 +00:00
Jonas Maebe
a0e35fd1bc * synchronised with trunk till r42118
git-svn-id: branches/debug_eh@42119 -
2019-05-25 13:19:06 +00:00
Jonas Maebe
77658b925b * disable regular array -> dynamic array type coversion support unless
{$modeswitch arraytodynarray} is active (mantis #35576)
   o changed compiler to compile without this modeswitch
   o added the modeswitch to a test that depends on it

git-svn-id: trunk@42118 -
2019-05-25 12:31:32 +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
e008785152 * insert the hidden parameters for objectdef methods after resolving
overrides but before generating the VMT, so that these hidden parameters
    are part of the procdefs stored in the VMT (fixes some LLVM type errors
    after r41716)

git-svn-id: trunk@41884 -
2019-04-16 16:11:50 +00:00
Jonas Maebe
a7bd37d17a * synchronised with trunk till r40776
git-svn-id: branches/debug_eh@41867 -
2019-04-13 15:16:09 +00:00
Jonas Maebe
0b61b5d4cf * added extra header to ppu inside a subsection, so we won't run into
trouble when the ppu version hits 255
  * also moved several ppu flags to a set inside that section

git-svn-id: trunk@41846 -
2019-04-06 21:28:43 +00:00
Jonas Maebe
dc2cbf8018 * synchronised with trunk till r41725
git-svn-id: branches/debug_eh@41726 -
2019-03-17 15:25:31 +00:00
Jonas Maebe
ed2ae508d0 * only add hidden parameters for objectdef methods after generating the vmt,
so that they take into account inherited calling conventions (mantis #35233)
   o don't needlessly calculate the paraloc info when generating a JVM mangled
     name

git-svn-id: trunk@41716 -
2019-03-16 19:14:14 +00:00
Jonas Maebe
ac883969a9 * synchronised with trunk till r41423
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
Jonas Maebe
8b9e90dc7a * keep track of whether a routine has a C-style variadic parameter in the
procoptions even when it's through an array-of-const parameter
  * always call create_varargs_paraloc_info() instead of create_paraloc_info()
    in the former case, even when no varargs parameters are specified (because
    on some platforms even some non-variadic parameters need to be passed
    differently, such as on ARM with gnueabihf)

git-svn-id: trunk@41420 -
2019-02-23 15:42:45 +00:00
Jonas Maebe
51b58f342f * synchronised with trunk till r40775
git-svn-id: branches/debug_eh@40776 -
2019-01-05 22:12:28 +00:00
Jonas Maebe
91d5457b38 * moved around/replaced the following procedures to stop nflw from depending
on pdecsub (node units should not depend on parser units):
   o maybe_add_public_default_java_constructor()
   o handle_calling_convention()
   o create_finalizer_procdef() (replaced with create_outline_procdef())
   o insert_record_hidden_paras()
   o handle_calling_convention()
   o proc_add_definition()
   o build_parentfpstruct()
   o maybe_guarantee_record_typesym()
   o get_first_proc_str()
  * factored out the creation of a procinfo for a nested procdef based on a
    subnodetree of the current procdef into tprocinfo.create_for_outlining()

git-svn-id: trunk@40773 -
2019-01-05 16:26:33 +00:00
Jonas Maebe
28df55fe08 * moved handle_calling_convention() to pparautl
git-svn-id: trunk@40772 -
2019-01-05 16:26:29 +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
ff8ccb06e5 * changed reverseparameters() from function into procedure: it does not make
sense as a function (the original input needed to be replaced by its
    result to make any sense), and someone already mistakenly used it like that
    in htypechk causing a bug/memory leak

git-svn-id: trunk@40729 -
2019-01-01 15:08:40 +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