Commit Graph

365 Commits

Author SHA1 Message Date
nickysn
9fa61a6c9f - removed the discardresult proc directive
git-svn-id: trunk@49017 -
2021-03-20 01:22:43 +00:00
nickysn
940738a3a1 * synchronized with trunk
git-svn-id: branches/wasm@48846 -
2021-03-01 13:21:24 +00:00
florian
34f7c3e6d4 + array defs. of open arrays are now marked by ado_OpenArray, so (internally!) zero sized array can be declared with 0..-1
git-svn-id: trunk@48758 -
2021-02-21 18:45:58 +00:00
nickysn
7e958e0a35 + introduced the discardresult directive and declared the UniqueString()
overloads, using this directive

git-svn-id: branches/wasm@48283 -
2021-01-21 21:42:07 +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
yury
40504a6f9d * If a nested procedure does not access its parent's frame pointer, optimize it by removing the hidden $parentfp parameter.
* Improved the tisogoto1.pp test.

git-svn-id: trunk@45292 -
2020-05-06 14:43:49 +00:00
svenbarth
60345366f2 * fix for Mantis #35140: apply patch by Ryan Joseph together with some further changes by me to add support for constant parameters in generics
+ added tests

git-svn-id: trunk@45080 -
2020-04-25 22:12:35 +00:00
Jonas Maebe
3188dc18d4 * fixed tdel1/2 tests again for AArch64/LLVM
git-svn-id: trunk@44195 -
2020-02-16 16:58:25 +00:00
Jonas Maebe
254b85c352 + new pio_inline_forbidden flag to indicate that while parsing the
implementation the compiler determined the routine must never be
    inlined
   o difference with po_noinline: can also be set in the implementation
   o difference with pio_inline_not_possible: it indicates that e.g.
     LLVM must not inline the routine either

git-svn-id: trunk@44065 -
2020-01-29 22:21:17 +00:00
Jonas Maebe
b355ba3d39 * record whether a function uses fastmath, and define the function as
strictfp if it doesn't (so LLVM doesn't perform transformations that can
    change the fp/exception behaviour)

git-svn-id: trunk@43818 -
2019-12-30 15:05:06 +00:00
Jonas Maebe
f5833dc048 * support for marking arraydefs as vectors
git-svn-id: trunk@43782 -
2019-12-24 22:12:31 +00:00
svenbarth
0a915e883e * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined
git-svn-id: trunk@43544 -
2019-11-21 21:44:53 +00:00
Jonas Maebe
2f914ee2d8 * packed tabstractvarsym.addr_taken/different_scope fields into a set
git-svn-id: trunk@43450 -
2019-11-11 09:26:51 +00:00
Jonas Maebe
9678542ba6 + add "thunk" attribute for stubs/thunks and emit it for LLVM
- also removed wrong "noreturn" attribute for interface thunks generated
     for high level code generator targets

git-svn-id: trunk@43018 -
2019-09-15 20:43:12 +00:00
Jonas Maebe
956aab3be0 * implement support for the Objective-C "related result type" convention
as described on
    http://releases.llvm.org/8.0.0/tools/clang/docs/LanguageExtensions.html#objective-c-features
    (rest of mantis #35994)

git-svn-id: trunk@42816 -
2019-08-25 15:23:53 +00:00
svenbarth
4c338b1f70 * generate correctly aligned string RTTI, fixes trtti7 on ARM
git-svn-id: trunk@42488 -
2019-07-23 20:53:54 +00:00
Jonas Maebe
83611b83cc * reverted r42463, the internalerrors were caused by a bug in the LLVM typed
constant builder

git-svn-id: trunk@42478 -
2019-07-21 11:07:02 +00:00
florian
217ae6e4bb * more fixes to rtti after attribute branch merging
git-svn-id: trunk@42476 -
2019-07-21 08:28:29 +00:00
Jonas Maebe
12e63d8a2c * don't reuse defs for attribute lists or individual attributes with parameters, as
they don't have a constant size
   o fixes LLVM internalerror 2015122402 for test/tcustomattr{12,13,19}

git-svn-id: trunk@42463 -
2019-07-20 12:08:55 +00:00
florian
3206ac3508 * properly align rtti for orddefs
git-svn-id: trunk@42448 -
2019-07-14 21:29:30 +00:00
florian
c932dfaf70 * first bunch of fixes for rtti for arm after attribute commits, fixes mostly alignment issues
git-svn-id: trunk@42446 -
2019-07-14 17:45:55 +00:00
svenbarth
a64a8f8deb - remove code to create an attribute using a synthetic function
git-svn-id: trunk@42396 -
2019-07-12 22:07:28 +00:00
svenbarth
71fa4d1fe2 * the RTTI of an attribute not only consists of the creation function, but also of the attribute's type, a pointer to the constructor and a data blob containing the constant parameters
+ added test

git-svn-id: trunk@42390 -
2019-07-12 22:07:05 +00:00
svenbarth
3ad24c9db8 * as attributes can be part of any type they are best suited in a common part of TTypeData
git-svn-id: trunk@42375 -
2019-07-12 22:06:09 +00:00
svenbarth
b2932393df Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 1/3]
Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.

git-svn-id: trunk@42356 -
2019-07-12 22:04:48 +00:00
Jonas Maebe
0cd0e1614b * synchronised with trunk till r42105
git-svn-id: branches/debug_eh@42106 -
2019-05-19 19:24:25 +00:00
Jonas Maebe
aad87820e6 * abstracted registration of library init/fini routines (to be able to add
LLVM support)

git-svn-id: trunk@42104 -
2019-05-19 19:20:47 +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
d93c05a90c * synchronised with trunk till r41207
git-svn-id: branches/debug_eh@41208 -
2019-02-03 21:05:37 +00:00
Jonas Maebe
503ea604f3 + nolinline modifier to specify that a routine must never be inlined
git-svn-id: trunk@41198 -
2019-02-03 21:00:17 +00:00
Jonas Maebe
b3a8543a56 * synchronised with trunk till r40942
git-svn-id: branches/debug_eh@40943 -
2019-01-20 17:37:07 +00:00
Jonas Maebe
51e68eb302 * fixed several places where the interface crc could change:
o unsetting po_inline while parsing the implementation for various reasons
     (interprocedural goto/label, accessing a local in a parent frame,
      having nested procedures)
   o instead handle this via the pio_inline_not_possible flag
   o noreturn can no longer be specified only in the implementation

git-svn-id: trunk@40789 -
2019-01-06 20:35:56 +00:00
Jonas Maebe
f26ac9026e * enable LLVM support Linux/AArch64
o also put the regular function result before the partfpstruct parameter

git-svn-id: branches/debug_eh@40577 -
2018-12-16 20:46:44 +00:00
Jonas Maebe
50ab607676 + customint torddef type to create arbitraty bit-width integers
o use this to handle non-power-of-two-sized parameters for llvm
   o no general support in the parser/code generator, so don't expose

git-svn-id: trunk@40398 -
2018-11-29 20:57:08 +00:00
yury
dd60397165 + Added the pio_inline_not_possible flag to timplprocoption. It is set if a function can't be inline (contains an assembler block, etc). When calling such functions, no note "Call to subroutine "?" marked as inline is not inlined" is emitted.
git-svn-id: trunk@40254 -
2018-11-07 12:20:30 +00:00
Jonas Maebe
0b246f3dbd * converted Boolean8 to an internal type, and mapped Boolean to the
new internal pasbool1(type) (part of mantis #34411)
   o apply the _Bool x86-64 parameter passing rules only to pasbool1

git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
yury
9ee1682955 * Fixed interface delegation for aarch64 (tdel1 and tdel2 tests).
It was broken by r31676 which did not take in account r29953. As a consequence $self was passed in register x1 instead of x0 when the method result is of a managed type.
  This fix enables changing order of the $self and $result parameters only for aarch64 AND llvm combination where it is actually needed.
  The issue with interface delegation still exists for aarch64-llvm and need to be fixed separately. Probably by applying llvm-specific workarounds as it was made in r29953 for regular aarch64 targets.

git-svn-id: trunk@39948 -
2018-10-16 20:32:02 +00:00
svenbarth
a076677336 * instead of a flags field generate a table with all Initialize operators of all fields (nested or not, parent class or not) for class types; objects and records don't use this (yet)
git-svn-id: trunk@39690 -
2018-08-29 19:21:35 +00:00
florian
0eea2141f6 * patch by J. Gareth Moreton: clarity in directive conflict error messages, resolves #33754
git-svn-id: trunk@39407 -
2018-07-07 14:46:01 +00:00
svenbarth
ac0322c323 + add a flags field to the record init RTTI which declares whether
a) the current record contains a field with non-trivial initialization
    b) and of the parents contains such a field (only relevant for objects and classes)

git-svn-id: trunk@39255 -
2018-06-20 19:00:17 +00:00
svenbarth
cc153176f3 + add a new symtable option sto_has_non_trivial_init that is true if the symtable contains a symbol with an
Initialize() operator (like sto_needs_init_final this flag is calculated on demand)
* increase PPU version

git-svn-id: trunk@39252 -
2018-06-20 19:00:08 +00:00
nickysn
02fb59d3e5 * unified the definition of pushleftright_pocalls on i8086 and i386
git-svn-id: trunk@38952 -
2018-05-08 14:27:36 +00:00
nickysn
42ebdbe277 + introduce po_hasnearfarcallmodel (specifies that the near/far call model was
specified explicitly). This will be useful, when we implement an automatic
  call model selection optimization.

git-svn-id: trunk@38732 -
2018-04-11 12:31:09 +00:00
nickysn
303309b28f + added support for 'external far' variables for i8086
git-svn-id: trunk@37532 -
2017-10-30 18:03:44 +00:00
svenbarth
50788e8b3b * correctly encapsulate the RTTI data for sets to avoid alignment problems with the new SetSize field (fixes compilation on Sparc and basically every other target that requires proper alignment with 64-bit values dictating an 8-Byte alignment)
git-svn-id: trunk@37201 -
2017-09-13 21:05:04 +00:00
svenbarth
5c97248f85 + also write the set's size to the RTTI as that simplifies handling in Invoke()
git-svn-id: trunk@37090 -
2017-08-31 19:23:12 +00:00
svenbarth
1950e57899 * fix order in tinternaltypeprefix so that it fits internaltypeprefixName
git-svn-id: trunk@37089 -
2017-08-31 18:53:20 +00:00
svenbarth
239d0704ca + add support for type helpers to also extend interface types
git-svn-id: trunk@37023 -
2017-08-21 20:49:20 +00:00
svenbarth
236a9b0aa5 * rework the checks for a helper's extended def to be a class so that it can be more easily extended by other objecttypes
git-svn-id: trunk@37022 -
2017-08-21 20:48:02 +00:00