svenbarth
db37146f12
* rework code for parsing attributes to only allow constant expressions; Delphi only allows those as well and better we don't open *that* pandora's box just yet
...
git-svn-id: trunk@42379 -
2019-07-12 22:06:24 +00:00
svenbarth
ab2fa724ec
* fix code formatting (no code changes)
...
git-svn-id: trunk@42378 -
2019-07-12 22:06:20 +00:00
svenbarth
62c137a6d8
* check that we indeed have a type node and nothing else
...
* with a type node it's not necessary to check whether it's typedef is assigned
git-svn-id: trunk@42377 -
2019-07-12 22:06:16 +00:00
svenbarth
f1715ff337
* fix code formatting (no code changes)
...
git-svn-id: trunk@42376 -
2019-07-12 22:06:13 +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
a1b556d211
* considering that at least in theory every symbol and every def can carry RTTI attributes (Delphi only supports property and field symbols), move the rtti_attribute_list to tstoredsym/tstoreddef
...
git-svn-id: trunk@42374 -
2019-07-12 22:06:05 +00:00
svenbarth
e296b26e9e
- remove unit info and related code again as that will be handled similar, but differently with dynamic packages
...
git-svn-id: trunk@42369 -
2019-07-12 22:05:47 +00:00
svenbarth
ee940c8270
* always write a class' reference to the attribute table, even if the unit does not have attributes
...
git-svn-id: trunk@42368 -
2019-07-12 22:05:42 +00:00
svenbarth
d137e06ade
* instead of embedding the attributes inside the class' and property's type data only store a reference to a table of attributes
...
git-svn-id: trunk@42365 -
2019-07-12 22:05:29 +00:00
svenbarth
ba413bcdfc
* fix typo
...
git-svn-id: trunk@42363 -
2019-07-12 22:05:21 +00:00
svenbarth
24c4b90343
* instead of declaring another type with a 'attribute' suffix, *search* for another type with a 'ATTRIBUTE' suffix (Delphi allows declaring both a TFoo and TFooAttribute in the same unit)
...
+ added test
git-svn-id: trunk@42362 -
2019-07-12 22:05:18 +00:00
svenbarth
ed5f19e7e3
* change boolean parameters for try_consume_unitsym to a set
...
git-svn-id: trunk@42360 -
2019-07-12 22:05:05 +00:00
svenbarth
39bab2dbcc
* rename trtti_attributesdef to trtti_attributes_list
...
git-svn-id: trunk@42359 -
2019-07-12 22:05:00 +00:00
svenbarth
84848df18d
Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 3/3]
...
Added FPC_REQUIRES_PROPER_ALIGNMENT to TUnitInfo definition. Added FPC_HAS_EXTENDED_RTTI define.
git-svn-id: trunk@42358 -
2019-07-12 22:04:56 +00:00
svenbarth
f91e38d1bd
Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 2/3]
...
Regenerated compiler/msgidx.inc and compiler/msgtxt.inc.
git-svn-id: trunk@42357 -
2019-07-12 22:04:53 +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
svenbarth
2a7b750d70
* write a name for the none property access entry (looks nicer than a "(Nil)" at the start of the line)
...
git-svn-id: trunk@42354 -
2019-07-12 16:25:36 +00:00
svenbarth
54c4fb2a00
* write an entry name for the property options
...
git-svn-id: trunk@42353 -
2019-07-12 16:25:33 +00:00
nickysn
0a94f8fc08
+ parse the IMPDEF record in TOmfObjInput.ReadImpDef
...
git-svn-id: trunk@42346 -
2019-07-09 12:31:11 +00:00
Jonas Maebe
7f772683cb
* fix tobjectdef.vmt_def to search in the correct symtable
...
* always register vmt defs (so they get written to the ppu) in case of llvm,
because it may need this def in case a method from a class defined in the
implementation of unit gets called from an inlined routine that gets
inlined in another unit (normally that vmt def would not get written to
the ppu file, as it can't be referenced from the interface and it's also
not necessarily directly referenced from the inline routine's nodes)
(fixes sdo_dataobject compilation with LLVM after enabling cross-unit
inlining of methods accessing static symbol table symbols)
git-svn-id: trunk@42342 -
2019-07-07 21:33:51 +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
449a14dddf
- disabled ogmacho, as it can no longer deal with the assembly we generate
...
git-svn-id: trunk@42339 -
2019-07-07 21:33:39 +00:00
Jonas Maebe
0f57327bff
* maybereplacewithtemp/maybereplacewithtempref: also create a temp in case
...
of possible side effects
git-svn-id: trunk@42338 -
2019-07-07 21:33:36 +00:00
Jeppe Johansen
7dc515b62c
- Fix result type of SizeOf and BitSizeOf to use sizesint instead of sint.
...
git-svn-id: trunk@42337 -
2019-07-07 14:37:45 +00:00
Jeppe Johansen
a1a17447ff
- Fix bug in 64bit softfloat double negation.
...
- Clean up handling of CPU/FPU type handling in RISCV.
- Do more fixes to get RISCV32 working.
- Fix most soft multiplication handling for generic RISCV code. Still missing a few.
- Add RISCV embedded targets.
git-svn-id: trunk@42335 -
2019-07-07 11:32:27 +00:00
Jonas Maebe
40082100e1
* fixed range test optimization for signed types and enabled it for them
...
git-svn-id: trunk@42332 -
2019-07-06 09:57:32 +00:00
svenbarth
2e4d8e36a5
* fix for Mantis #35670 : when a unused dummy symbol is found for a non-generic procedure/function, hide that dummy symbol and create a new symbol for the procedure/function
...
+ added tests
git-svn-id: trunk@42329 -
2019-07-05 14:12:16 +00:00
svenbarth
d0eddbcbb9
* fix for Mantis #35735 : also handle "generic" keyword inside helper types
...
+ added test
git-svn-id: trunk@42328 -
2019-07-05 14:12:13 +00:00
marcus
d9f3867783
Fixed ppudump compilation on big endian platforms after r42324
...
git-svn-id: trunk@42325 -
2019-07-04 16:49:26 +00:00
pierre
40f0372d8c
Correctly read saved tsettings
...
git-svn-id: trunk@42324 -
2019-07-04 15:25:40 +00:00
pierre
d8b89432a2
* Set ControllerSupport to false for sparc/sparc64 and x86_64 CPUs.
...
This boolean must only be set to true if TControllerType is not simply (ct_none)
* ppu.pas: Increment CurrentPPULongVersion constant as the above modification
changes the number of fields of the TSettings record that is saved to
PPU in ST_LOADSETTINGS field.
git-svn-id: trunk@42323 -
2019-07-04 15:24:49 +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
pierre
67cf63049d
Commit patch submitted in bug report #35787 by Gareth Moreton
...
git-svn-id: trunk@42318 -
2019-07-01 19:42:48 +00:00
Jonas Maebe
56acdd3a11
* fixed compilation with -dTest_Double_checksum_write
...
git-svn-id: trunk@42314 -
2019-06-30 17:19:31 +00:00
Jonas Maebe
40f6a4ea3c
- removed remnants of old ppu file support (ppudump does not support any
...
other ppu version than the current one anyway)
git-svn-id: trunk@42313 -
2019-06-30 16:24:48 +00:00
Jonas Maebe
cc9f8b7f56
* record in ppu flag whether or not symbols are ansistrings, and use that
...
flag in ppudump rather than hardcoding targets (it's also the case for
LLVM)
git-svn-id: trunk@42312 -
2019-06-30 16:24:44 +00:00
Jonas Maebe
789f13eb24
* LLVM-specific support for popcnt
...
git-svn-id: trunk@42311 -
2019-06-30 15:23:36 +00:00
Jonas Maebe
0a91fcb44f
* LLVM-specific support for bsr*/bsf*
...
git-svn-id: trunk@42309 -
2019-06-29 16:27:18 +00:00
Jonas Maebe
6b97c712f6
* volatile syms should never be regable
...
git-svn-id: trunk@42308 -
2019-06-29 16:27:14 +00:00
Jonas Maebe
98f55b1d86
* also register symbols referenced from assembler via asolutevarsyms
...
git-svn-id: trunk@42307 -
2019-06-29 16:27:10 +00:00
Jonas Maebe
c425c51963
* simplify and optimize generated LLVM code for case statements
...
git-svn-id: trunk@42305 -
2019-06-29 12:17:49 +00:00
svenbarth
982a870b15
* remaining fix for Mantis #35346 : add "inline" directives to various methods of tentryfile
...
git-svn-id: trunk@42304 -
2019-06-28 13:30:35 +00:00
svenbarth
a578993234
* partial fix for Mantis #35346 : more "inline" directives for TCStream and TCMemoryStream methods
...
git-svn-id: trunk@42303 -
2019-06-28 13:30:33 +00:00
Jonas Maebe
7ef3d39d93
* one more disable location of DoPipe in case not on a Unix platform
...
(mantis #35743 )
git-svn-id: trunk@42302 -
2019-06-27 19:20:45 +00:00
pierre
af03c0208b
Use tcgint typecast instead of aint, as it is the type of the second parameter of loadconst taicpu method
...
git-svn-id: trunk@42281 -
2019-06-25 04:24:56 +00:00
Jonas Maebe
c038e4c3f2
* relaxation of r42272: again only show warnings rather than errors for
...
out-of-range constants, because of the comments mentioned in #35753
(except for enums, as apparently Delphi does the same)
* added range check warnings about explicit type casts that throw away
bits (e.g. byte($fff)), without giving warnings for most common cases
(like cardinal(-1))
* fixed masking/sign exting constant array indices (must be based on index
range type size/signedness rather than on array size/"signedness")
git-svn-id: trunk@42275 -
2019-06-23 14:12:33 +00:00
Jonas Maebe
b1a41aa5b8
* fixed NR_INVALID declaration
...
git-svn-id: trunk@42274 -
2019-06-23 14:12:28 +00:00
Jonas Maebe
3a2fe24f49
* report range errors for assigning out-of-range constants to enums in
...
Delphi mode (mantis #35671 )
* always give an error (rather than only a warning in case range checking
is disabled) when assigning an out-of-range constant to an ordinal variable
whose type does not span the entire range that its bits can hold (because
the result is undefined and FPC's optimisers rely on variables only
holding values that are valid for the type)
git-svn-id: trunk@42272 -
2019-06-22 17:30:42 +00:00
pierre
243c967967
Commit of new debug feature implemented by J. Gareth Moreton
...
Allows compilation of compiler using -dDEBUG_NODE_XML
which will generate a NAME-node-dump.xml file for each
unit, program or library compiled,
containing a XML description of the nodes handled during
compilation of the unit, program or library.
git-svn-id: trunk@42271 -
2019-06-22 14:08:47 +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
b71164deca
* fix warnings
...
git-svn-id: branches/debug_eh@42256 -
2019-06-20 17:13:59 +00:00
florian
1ed0000ae8
+ Encode(U/S)leb128 take now a third parameter to force that the constant has a certain minimum size
...
+ tai_const has a new field fixed_size which is used to fix the size of an s/uleb128. This is needed to ensure convergence during assembling when calculating offsets
git-svn-id: branches/debug_eh@42255 -
2019-06-20 17:13:28 +00:00
florian
adb8e1b76c
* fix writing of augmentation size
...
git-svn-id: branches/debug_eh@42254 -
2019-06-20 15:33:49 +00:00
florian
e4f821487d
* write correct s/uleb types
...
git-svn-id: branches/debug_eh@42253 -
2019-06-20 15:30:07 +00:00
Jonas Maebe
d6174499b1
* disable array and record regvars for all cpuhighleveltarget platforms
...
git-svn-id: trunk@42246 -
2019-06-18 19:16:33 +00:00
nickysn
5d4af28c0f
+ implemented TOmfRecord_COMENT_IMPDEF.DecodeFrom
...
git-svn-id: trunk@42242 -
2019-06-17 01:53:38 +00:00
florian
d80dc03ccb
* building on powerpc and arm fixed
...
git-svn-id: trunk@42241 -
2019-06-16 21:43:46 +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
nickysn
fbbf1f4f1c
+ Implemented TOmfRecord_COMENT_EXPDEF.DecodeFrom
...
git-svn-id: trunk@42238 -
2019-06-15 22:14:09 +00:00
nickysn
cbf95aebf4
+ introduced the TOmfRecord_COMENT_EXPDEF class. Use that to generate export
...
libraries instead of generating the magic string directly.
git-svn-id: trunk@42237 -
2019-06-15 00:30:07 +00:00
nickysn
eea3eb1a8e
+ introduced the TOmfRecord_COMENT_IMPDEF class. Use it to encode the IMPDEF
...
records instead of encoding them directly.
git-svn-id: trunk@42236 -
2019-06-14 23:50:48 +00:00
nickysn
85684eb66d
+ introduced the TOmfRecord_COMENT_Subtype abstract class
...
git-svn-id: trunk@42235 -
2019-06-14 23:26:37 +00:00
nickysn
9fe80d7416
+ use the new CC_OmfExtension_IMPDEF constant instead of the direct magic value
...
when writing IMPDEF records
git-svn-id: trunk@42234 -
2019-06-14 23:11:25 +00:00
nickysn
4f3a5cfd1e
+ use the new CC_OmfExtension_EXPDEF constant instead of the direct magic value
...
when writing export libraries
git-svn-id: trunk@42233 -
2019-06-14 23:10:38 +00:00
nickysn
0db19546ef
+ dispatch the IMPDEF and EXPDEF records to the newly introduced ReadImpDef and
...
ReadExpDef methods (not implemented yet)
git-svn-id: trunk@42232 -
2019-06-14 23:06:58 +00:00
nickysn
cdd2ba1a4d
+ added constants for the known CC_OmfExtension record subtypes (IMPDEF and
...
EXPDEF are the ones we care about - they are used in win16 dll import and
export libraries)
git-svn-id: trunk@42231 -
2019-06-14 22:59:50 +00:00
nickysn
fe49522e6f
+ register a win16 dll scanner. Not functional yet.
...
git-svn-id: trunk@42230 -
2019-06-14 22:40:11 +00:00
nickysn
1f3d5e8865
- remove the tiny memory model code from TInternalLinkerWin16.DefaultLinkScript,
...
because the Win16 target doesn't support the tiny memory model
git-svn-id: trunk@42229 -
2019-06-14 22:24:19 +00:00
nickysn
9eaa46f791
+ implement TInternalLinkerWin16.DefaultLinkScript by copying the MS-DOS
...
implementation (not correct, but a good starting point)
git-svn-id: trunk@42228 -
2019-06-14 22:20:51 +00:00
nickysn
db1903f45d
+ added a win16 internal linker class. Not functional yet.
...
git-svn-id: trunk@42226 -
2019-06-14 16:42:45 +00:00
nickysn
d3c3f2742c
+ added class TNewExeOutput. Not functional yet.
...
git-svn-id: trunk@42225 -
2019-06-14 16:23:23 +00:00
nickysn
7871ccd054
+ initialize some defaults in the TNewExeHeader constructor
...
git-svn-id: trunk@42224 -
2019-06-14 15:51:25 +00:00
nickysn
1474db42e4
+ added class TNewExeHeader that encapsulates a NewExe header and allows writing it to a file
...
git-svn-id: trunk@42223 -
2019-06-14 14:16:22 +00:00
Legolas
a9b015911d
* Updated Wii port to libogc 1.8.22
...
git-svn-id: trunk@42216 -
2019-06-12 16:35:25 +00:00
florian
73c8861929
* suppress warning for targets without MM registers
...
git-svn-id: trunk@42214 -
2019-06-11 20:03:47 +00:00
nickysn
dec03b5ac7
+ added the asmmodes_x86_att set constant - similar to asmmode_x86_intel, but for AT&T asm syntax
...
git-svn-id: trunk@42212 -
2019-06-11 15:51:40 +00:00
nickysn
697f2fcf75
* prettify the "Use of -offset(%esp), access may cause a crash or value may be
...
lost" warning by showing the exact register used (esp or rsp) and using the
asm syntax (Intel or AT&T) used originally in the code
git-svn-id: trunk@42211 -
2019-06-10 16:19:06 +00:00
nickysn
d2b3da1f14
+ add asmmode_standard to the asmmodes_x86_intel set on i8086, because i8086 defaults to intel syntax
...
git-svn-id: trunk@42210 -
2019-06-10 15:58:16 +00:00
nickysn
ce8ec3ab5d
+ introduced the asmmodes_x86_intel constant set
...
git-svn-id: trunk@42209 -
2019-06-10 15:44:19 +00:00
nickysn
4f2ab3fb11
* prettify the "Use of -offset(%ebp) is not recommended for local variable
...
access" warning by showing the exact register used (bp, ebp or rbp) and using
the original asm syntax
git-svn-id: trunk@42208 -
2019-06-10 15:26:46 +00:00
nickysn
1e07606cbf
* prettify the "Use of +offset(%ebp) is not compatible with regcall convention"
...
and "Use of +offset(%ebp) for parameters invalid here" warning messages by
showing the exact register used (bp, ebp or rbp) and using the original asm
syntax (Intel: [EBP+offset]; AT&T: +offset(%ebp) )
git-svn-id: trunk@42207 -
2019-06-10 15:08:46 +00:00
pierre
49fed0c710
Fix error in commit #42199
...
git-svn-id: trunk@42206 -
2019-06-10 13:55:59 +00:00
Jonas Maebe
f1b66a9741
* fixed LLVM type checking of typed files in ISO mode (fixes webtbs/tw34848)
...
git-svn-id: branches/debug_eh@42205 -
2019-06-10 13:36:57 +00:00
Jeppe Johansen
0d97dc7965
avr: Fixed some inconsistencies.
...
git-svn-id: trunk@42204 -
2019-06-10 13:35:38 +00:00
nickysn
2487fa7605
+ added set TNewExeSegmentFlags
...
git-svn-id: trunk@42203 -
2019-06-10 13:06:58 +00:00
Legolas
7c02f2b531
* Nintendo DS port updated to libnds ver.1.7.3
...
git-svn-id: trunk@42202 -
2019-06-10 06:39:46 +00:00
Legolas
4239742b35
* GBA port updated
...
git-svn-id: trunk@42201 -
2019-06-09 22:27:16 +00:00
pierre
14b9032ef2
Use use_tag_types everywhere to get consistent results for 'Tt' versus 't' for stabs for string definitions
...
git-svn-id: trunk@42199 -
2019-06-09 20:59:06 +00:00
florian
fe99252a9b
* lazarus version update
...
git-svn-id: trunk@42198 -
2019-06-09 20:08:09 +00:00
florian
17c48694a5
* fix bootstrapping with 3.0.x and -O3
...
git-svn-id: trunk@42197 -
2019-06-09 20:05:21 +00:00
Jonas Maebe
9a327f1fcd
* ensure the LLVM-based compiler does not try to load units compiled with a
...
non-LLVM-base compiler and vice versa (caused internal errors, because
the LLVM compiler uses different nodes, and these are saved in the PPUs
for inline routines)
git-svn-id: branches/debug_eh@42196 -
2019-06-08 20:17:10 +00:00
Jonas Maebe
21bc37db44
* place exception handling code in the correct asmlist
...
git-svn-id: branches/debug_eh@42195 -
2019-06-08 20:17:06 +00:00
Jonas Maebe
d0be4f11b8
* "on" nodes inherit the exception catching state from the "try"
...
git-svn-id: branches/debug_eh@42194 -
2019-06-08 20:17:01 +00:00
Jonas Maebe
3f2578a3e3
* don't quote LLVM calling convention name (that will cause it to be ignored)
...
o fixes tasm10a and tx64ccnv.ll with LLVM
git-svn-id: branches/debug_eh@42193 -
2019-06-08 17:11:20 +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
1dee4c41dd
- removed "cmp 0/1, pasbool1" optimization for llvm because this discards
...
the upper 7 bits of the boolean, while other platforms take it into
account (even though they're technically always required to be 0, and
the value is undefined if they're not)
git-svn-id: trunk@42189 -
2019-06-07 18:17:55 +00:00
nickysn
465e8a99e0
+ added type TNewExeAdditionalHeaderFlags
...
git-svn-id: trunk@42188 -
2019-06-07 14:15:07 +00:00
nickysn
ded3dec22a
+ added enum TNewExeTargetOS
...
git-svn-id: trunk@42187 -
2019-06-07 13:09:35 +00:00
nickysn
4dbccce43c
+ added TNewExeHeaderFlags type, describing the flags in the header of win16 executables
...
git-svn-id: trunk@42179 -
2019-06-06 16:00:29 +00:00
nickysn
914426e703
* fixed an i8086 inline assembler bug, where 'call word ptr [label]' (an
...
indirect call) was assembled as 'call near label' (direct call) instead of
'call near [label]' and 'call dword ptr [label]' was assembled as
'call near label' instead of 'call far [label]'
git-svn-id: trunk@42176 -
2019-06-05 15:49:39 +00:00
Jeppe Johansen
750567f8e3
Added T2 form of LDR/STR for SP relative forms.
...
git-svn-id: trunk@42169 -
2019-06-03 22:10:49 +00:00
Jonas Maebe
eab079c7bd
* fixed cbool "and" with full boolean evaluation, and cbool "xor"
...
(mantis #35272 )
git-svn-id: trunk@42167 -
2019-06-02 20:04:06 +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
Jeppe Johansen
aa4961d06e
- Add mov optimization for STS instruction.
...
git-svn-id: trunk@42163 -
2019-06-02 14:55:30 +00:00
Jeppe Johansen
5bdc635f50
Check if the current register was the last in the cgpara, to avoid running over the last register allocated.
...
git-svn-id: trunk@42159 -
2019-06-02 09:13:19 +00:00
Jeppe Johansen
cba4aeaca5
Fix division of constants on ARM thumb without long multiplication.
...
git-svn-id: trunk@42158 -
2019-06-01 20:30:09 +00:00
Jeppe Johansen
c867d2b7f6
Generalize skip instruction optimization for both sbix and sbrx.
...
git-svn-id: trunk@42154 -
2019-06-01 15:20:34 +00:00
marco
9313ddea78
* fix mantis 035656
...
git-svn-id: trunk@42146 -
2019-05-31 10:32:49 +00:00
nickysn
40e6c06f67
* fixes to the compiler util exe search routines, which caused the compiler to
...
erroneusly find '/usr/bin/ld' instead of '/usr/bin/ld.bfd' on OpenBSD, which
silently produced broken executables, which made this bug even more "fun" to
find. :)
git-svn-id: trunk@42128 -
2019-05-26 16:57:08 +00:00
nickysn
0c471494e8
* use explicitly GNU LD ('ld.bfd') on OpenBSD, instead of the default 'ld'
...
linker, because in OpenBSD 6.5, it has been replaced with the LLVM linker and
the LLVM linker produces broken position independent executables with FPC.
git-svn-id: trunk@42127 -
2019-05-26 16:51:51 +00:00
Jonas Maebe
489582e36a
* fix ppudump compilation
...
git-svn-id: branches/debug_eh@42121 -
2019-05-25 14:41:30 +00:00
Jonas Maebe
c2124e8c9a
* fixed compilation for CPU16BITADDR
...
git-svn-id: branches/debug_eh@42120 -
2019-05-25 13:44:31 +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
pierre
c752aa5cf5
Avoid incomplete case warning when compiled with -dTEST_WIN32_SEH
...
git-svn-id: trunk@42115 -
2019-05-24 10:14:51 +00:00
pierre
769f85783a
List TSettings partially and improve generic output
...
git-svn-id: trunk@42111 -
2019-05-20 22:06:57 +00:00
pierre
dd418f24b5
Add DEBUG_PPU conditional code to be able to debug ppu changes (only useful for debugging purposes)
...
git-svn-id: trunk@42110 -
2019-05-20 12:48:12 +00:00
Jonas Maebe
5473f4fc44
+ LLVM support for library init/fini routines
...
git-svn-id: branches/debug_eh@42108 -
2019-05-19 19:26:59 +00:00
Jonas Maebe
9f18cbf5d6
* support writing aggregate LLVM constants that are not packed
...
git-svn-id: branches/debug_eh@42107 -
2019-05-19 19:26:55 +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
a418dc6c91
* made the fields array parameter of llvmgettemprecorddef "const", as it
...
doesn't get modified and hence doesn't need to be copied
git-svn-id: trunk@42103 -
2019-05-19 19:20:42 +00:00
Jonas Maebe
4c34b7b67d
* fixed memory leak
...
git-svn-id: trunk@42101 -
2019-05-19 19:20:34 +00:00
Jonas Maebe
eb0f02348d
* fixed loading parent frame pointer for nested procvars on targets that
...
that use explicit parentfp structs (fixes webtbs/tw17379 for llvm)
git-svn-id: trunk@42100 -
2019-05-19 19:20:29 +00:00
Jonas Maebe
3bee9ab9da
* two different specialisations with the same types from different units
...
still need a type conversion with llvm, as their type identifiers will
be different
git-svn-id: branches/debug_eh@42097 -
2019-05-18 18:49:05 +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
8ec3cd6390
* append rather than insert the alias symbols for the program/procedure
...
initialisation/finalisation routines
o this ensures the procdef's mangled name and its first symbol match,
which is required for Darwin when generating debug information and
using ".set" directives to define alias symbols, because a symbol
defined via ".set" cannot be used in a data relocations (and the DWARF
debug generator uses the default mangled name, which used to correspond
to the alias symbol due to the "insert" instead of "append")
git-svn-id: trunk@42094 -
2019-05-18 18:41:33 +00:00
Jonas Maebe
332679e28a
* updated German message files (patch by Karl-Michael Schindler,
...
mantis #35559 )
git-svn-id: trunk@42092 -
2019-05-18 12:29:35 +00:00
Jonas Maebe
7e51c5e856
* DFA now takes case-completeness into account (mantis #35598 )
...
git-svn-id: trunk@42091 -
2019-05-18 12:01:41 +00:00
pierre
2ff391c25c
Fix arm-aros rtl compilation
...
git-svn-id: trunk@42090 -
2019-05-17 06:39:57 +00:00
svenbarth
755e271b4e
* fix for Mantis #35566 by applying patch by Martin Friebe: correctly dereference the 32-bit length value for Windows Widestrings
...
git-svn-id: trunk@42087 -
2019-05-16 20:56:18 +00:00
pierre
c0f064a35c
Remove two warnings about missing case (others are still present in ppudump.pp source)
...
git-svn-id: trunk@42085 -
2019-05-16 12:42:39 +00:00
pierre
8d4588e1b2
Fix compilation of compiler with -dPREPROCWRITE
...
git-svn-id: trunk@42084 -
2019-05-16 12:17:32 +00:00
Jonas Maebe
cf9596421b
* fixed crashes on platforms using parentfpstructs with generic routines
...
that contain nested functions (when specialised, procedures don't have
the main function of the unit/program as parent procinfo)
git-svn-id: trunk@42063 -
2019-05-14 19:19:14 +00:00
Jonas Maebe
b291d17fc5
* fix overflow errors in case coverage code
...
git-svn-id: trunk@42059 -
2019-05-13 20:30:28 +00:00
Jonas Maebe
d74b0843df
* set null-pointer-is-valid attribute on functions, so that LLVM does not
...
optimise provable accesses to null as undefined behaviour (requires
LLVM/Clang 7.0 or later)
git-svn-id: branches/debug_eh@42055 -
2019-05-12 21:09:44 +00:00
Jonas Maebe
853e622fb7
* fix case completeness warnings
...
git-svn-id: branches/debug_eh@42051 -
2019-05-12 18:46:47 +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
ba1b4b1c92
+ support for verifying whether a case statements handles all possibilities
...
(based on patch by Martok)
o enabled by default in ISO and Extended Pascal: compile-time error if not
the case in ISO mode, warning and run-time error in Extended Pascal mode
o warning enabled by default in all other modes for boolean, enumeration and
subrange integer types with ranges different from the default ones
(i.e., different from 0..255, -128..127, 0..65536, etc)
o warnings for all ordinal types can be enabled in all modes with
-CC
git-svn-id: trunk@42047 -
2019-05-12 14:29:11 +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
f76cde1c4c
* set correct fileinfo for statements_til_end() block
...
git-svn-id: trunk@42044 -
2019-05-12 14:28:52 +00:00
svenbarth
faaa9f94fa
* addstringdef() now correctly declares the debug information for a Windows WideString, so use that instead of treating it merely like a PWideChar
...
git-svn-id: trunk@42039 -
2019-05-11 15:38:59 +00:00
svenbarth
e769233436
* fix for Mantis #35386 : use the correct size for the string's length (SizeInt for Ansi-/UnicodeString and DWord for WideString)
...
git-svn-id: trunk@42038 -
2019-05-11 15:38:56 +00:00
svenbarth
1349f1db03
* fix for Mantis #35359 : only WideString counts the size in Byte, UnicodeString uses the size in WideChars
...
git-svn-id: trunk@42037 -
2019-05-11 15:38:51 +00:00
svenbarth
251c559662
* fix for Mantis #35533 : when searching for helpers on types that usually don't support a point operator, don't use automatic dereferentiation
...
+ added tests
git-svn-id: trunk@42036 -
2019-05-10 20:56:41 +00:00
svenbarth
5a5b47fa24
+ add support for MultiHelpers modeswitch by Ryan Joseph for Mantis #35159
...
+ added tests
git-svn-id: trunk@42026 -
2019-05-10 14:04:45 +00:00
svenbarth
0bd1687398
* fix for Mantis #35326 (applied patch by Cyrax): objcopy's --add-gnu-debuglink parameter doesn't handle quoted paths correctly, so quote the whole path
...
git-svn-id: trunk@42025 -
2019-05-10 12:59:26 +00:00
Jonas Maebe
7dbbce157f
* fixed Objective-C metadata generation for LLVM
...
git-svn-id: branches/debug_eh@41980 -
2019-05-02 19:45:34 +00:00
Jonas Maebe
024b38e1ff
* fixed setting calling convention for calls (the callpd passed to the
...
taillvm constructors is not necessarily a proc(var)def)
git-svn-id: branches/debug_eh@41979 -
2019-05-02 19:45:30 +00:00
Jonas Maebe
3fa6838815
* basic llvm metadata support
...
git-svn-id: branches/debug_eh@41978 -
2019-05-02 19:45:26 +00:00
Jonas Maebe
3a1fb45315
* synchronised with trunk till r41976
...
git-svn-id: branches/debug_eh@41977 -
2019-05-02 19:44:41 +00:00
Jonas Maebe
079d616978
* fixed double free in LLVM code generator after r41963
...
git-svn-id: trunk@41976 -
2019-05-02 19:40:00 +00:00
Jonas Maebe
97a144ea6a
- removed ttypedconstkind parameter from tai_simpletypedconst constructor,
...
as it always has to be tck_simple anyway
git-svn-id: trunk@41975 -
2019-05-02 19:39:56 +00:00
Jonas Maebe
213b87fe91
* optimized and simplified tai_aggregatetypedconst destruction
...
git-svn-id: trunk@41963 -
2019-04-30 19:36:46 +00:00
Jeppe Johansen
3ad450c636
avr: Add peephole optimization for in+sbr* bit test sequence.
...
git-svn-id: trunk@41962 -
2019-04-30 17:00:30 +00:00
Jonas Maebe
55aeac44f0
* micro-optimization for tentryfile.getbyte() (based on patch by
...
J. Gareth Moreton, mantis #35406 )
git-svn-id: trunk@41924 -
2019-04-22 15:16:33 +00:00
Jonas Maebe
8d19bb12a2
* moved sleb/uleb128 helpers to cutils and use SarInt64() intrinsic (based on
...
patch by J. Gareth Moreton, mantis #35327 )
git-svn-id: trunk@41917 -
2019-04-21 10:07:42 +00:00
Jonas Maebe
128bf046b4
* regenerated Makefiles with LLVM bitcode installation support
...
git-svn-id: branches/debug_eh@41914 -
2019-04-20 18:56:45 +00:00
Jonas Maebe
cd3e4d26d4
* recognise extra llvm/Xcode versions
...
git-svn-id: branches/debug_eh@41912 -
2019-04-20 18:56:19 +00:00
Jonas Maebe
46efaf4b2c
+ support for -CLflto_nosystem option to perform LTO for everything except
...
for the system unit, as there are several bugs in the Xcode linkers
that trigger when the system unit is involved:
o Xcode 9.3: the second symbol associated with routines that have multiple
symbols (such as FPC_INTERLOCKED*) gets moved to the next routine (so
e.g. calling InterlockedIncrement results in calling InterlockedExchange)
o Xcode 10.1: the linker does not generate native code for the personality
routine (probably because it's not referenced directly anywhere)
git-svn-id: branches/debug_eh@41911 -
2019-04-20 18:56:15 +00:00
Jonas Maebe
fc60ec2ea4
+ support for LLVM LTO: compile units with -CLflto -> when compiling a main
...
program/library also with -Clflto, all units compiled with that option
will be linked using their bitcode files and LTO
o compiling with -CLflto will compile all units twice: once for normal
(static or smart) linking, and once for LTO. So the result can be
used both with and without LTO.
git-svn-id: branches/debug_eh@41910 -
2019-04-20 18:56:11 +00:00
Jonas Maebe
810d0ab2fe
* use $DARWINVERSION functionality to pass Darwin/iOS version to clang when
...
assembling llvm bitcode
git-svn-id: branches/debug_eh@41909 -
2019-04-20 18:56:07 +00:00
Jonas Maebe
2923e484fd
* synchronised with trunk till r41907
...
git-svn-id: branches/debug_eh@41908 -
2019-04-20 18:22:52 +00:00
Jonas Maebe
d150869dea
* record symbols that need to remain in their original order, and on Darwin
...
pass them to the linker so it does not reorder them
o fixes resource strings on Darwin when using LTO (this used to reorder the
resource string symbols, so they no longer all appeared between the START
and END symbols for their compilation module)
git-svn-id: trunk@41907 -
2019-04-20 18:18:10 +00:00
Jonas Maebe
33d57ac646
* replaced TCmdStrListItem getter function with a property
...
git-svn-id: trunk@41906 -
2019-04-20 18:18:07 +00:00
Jonas Maebe
0225a3a39a
* ppudump: fixed reading of ibresource section
...
git-svn-id: trunk@41905 -
2019-04-20 18:18:03 +00:00
Jeppe Johansen
12879adc2f
- Adds intrinsics to save/restore SREG when disabling interrupts.
...
- Adds nostackframe to stack frame investigation stubs.
git-svn-id: trunk@41898 -
2019-04-18 18:26:51 +00:00
pierre
ec76e879c9
Integrate patch from bug report 35409.
...
Add possibiliy to throw InternalError
for unhandled case values inside tentryfile,
But avoid adding dependency on verbose unit
as this would break ppudump handling of ppu files.
Add RaiseAssertion virtual method to tentryfile class.
Call RaiseAssertion in tentryfile methods
where an internal error is wanted.
Override RaiseAssertion method in symtype.pas unit
to call InternalError.
Add new class tppudumpfile to override RaiseAssertion
in utils/ppuutils/ppudump.pp unit.
git-svn-id: trunk@41896 -
2019-04-18 14:08: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
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
Jeppe Johansen
44beea91b5
- Fix UTX* optimizations that didn't consider the optional ROR parameter.
...
git-svn-id: trunk@41880 -
2019-04-15 21:52:55 +00:00
Jeppe Johansen
53542b7c5e
- Port RISC-V64 startup code to native inline routines.
...
git-svn-id: trunk@41871 -
2019-04-14 23:36:08 +00:00
Jeppe Johansen
2b78a8fd3d
- Add support for .option directive in riscv assembler.
...
- Use addiw when adjusting U32 to S32
git-svn-id: trunk@41870 -
2019-04-14 20:51:29 +00:00
svenbarth
e6add40495
* fix for Mantis #35348 : correctly handle symbols that aren't parameter types (e.g. default values)
...
+ added test
git-svn-id: trunk@41869 -
2019-04-14 20:47:47 +00:00
svenbarth
c147debda1
* ensure that the correct amount of parameters is used for an operator overload (this is essentially important for unary operators that were declared with two arguments)
...
git-svn-id: trunk@41868 -
2019-04-14 20:47:43 +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
349bb2ff38
* check CurrentPPULongVersion in ppumove
...
git-svn-id: trunk@41866 -
2019-04-13 15:12:09 +00:00
Jonas Maebe
927fbc4387
* documented usage of ppuversion and ppulongversion
...
git-svn-id: trunk@41865 -
2019-04-13 14:58:15 +00:00
Jonas Maebe
1b0b81f714
* hopefully fix fpu emulation ppu header flag check after r41846
...
git-svn-id: trunk@41847 -
2019-04-07 17:10:49 +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
svenbarth
18519c9559
* fix for Mantis #34526 : rely on tc_arrayconstructor_2_set instead of manually converting an array constructor to a set, this way assignment operator overloads are taken into account as well
...
Note: there is still a conversion to a set if the types were determined to be incompatible, so that the error is still "set of X is incompatible to Y" instead of "array of Z is incompatible to Y"
+ added tests
git-svn-id: trunk@41844 -
2019-04-05 15:24:39 +00:00
svenbarth
156b25501d
* improve conversion of array constructor to set so that it behaves as if done inside pass_typecheck
...
git-svn-id: trunk@41843 -
2019-04-05 15:24:36 +00:00
svenbarth
307ff071e6
* allow any untyped parameter to be passed to a untyped constref parameter
...
+ added test
git-svn-id: trunk@41829 -
2019-04-04 19:31:55 +00:00
pierre
478b918386
+ Add variables to use gppc386 utils more easily:
...
Use DEBUG_CYCLE=1 to generate cycle using gppcXX at each stage,
i.e. running ppcXX through gdbpas, using utils/gppc386.pp source,
compiled and copied to gppcXX.
+ Add other DEBUG_XXX varialbes, allowing to use gppcXX binary
at a specific level in cycle.
if DEBUG_PPXX is set, PPXXPREFIX variable will be set to 'g'
leading to the use of g$(PPXX) compiler, which will run $(ppXX)
compiler through gdbpas.
git-svn-id: trunk@41822 -
2019-04-03 07:17:40 +00:00
svenbarth
f7817d25ff
* parameter type needs to be Nil for formal parameters (Delphi compatible)
...
* adjusted test trtti15
+ added test trtti19
git-svn-id: trunk@41770 -
2019-03-22 22:29:20 +00:00
nickysn
516438fd19
* converted the i386 OpenBSD startup code to Pascal
...
git-svn-id: trunk@41764 -
2019-03-22 00:54:01 +00:00
nickysn
8f8aa70074
+ OpenBSD i386 and x86_64 support in tcgx86.g_profilecode
...
git-svn-id: trunk@41760 -
2019-03-21 17:09:21 +00:00
nickysn
85fdd37cac
+ support creating linker map files (with the -Xm option) on *BSD
...
git-svn-id: trunk@41759 -
2019-03-21 13:54:15 +00:00
nickysn
261114ff32
+ introduce the $OPENBSD_LOCALBASE and $OPENBSD_X11BASE pseudo variables; these
...
may now be used in fpc.cfg, etc. They evaluate to /usr/local and /usr/X11R6 by
default, but may optionally be overriden via the LOCALBASE and X11BASE
environment variables.
* use the new $OPENBSD_LOCALBASE and $OPENBSD_X11BASE variables in the default
library search path on OpenBSD
git-svn-id: trunk@41755 -
2019-03-20 17:03:11 +00:00
nickysn
52a5669117
+ enable weak externals for OpenBSD
...
* converted the reference to _init in si_dll to be a weak external. This way we
can support creating shared libraries that link to the C library as well as
libraries that do not. If libc was linked, the compiler will link in
crtbeginS.o and crtendS.o; _init is defined in crtbeginS.o and initializes the
C library and calls all the C static constructors.
git-svn-id: trunk@41751 -
2019-03-20 15:13:47 +00:00
nickysn
34a8032e11
* link to crtbegin.o/crtend.o instead of crtbeginS.o/crtendS.o when creating
...
normal OpenBSD programs (not shared libraries) that link to the C library,
even when PIC code generation has been turned on. This is what gcc and clang
do on this platform.
git-svn-id: trunk@41740 -
2019-03-19 16:36:38 +00:00
Károly Balogh
2c1639003c
* reinstate the internalerror removed in r41730 for i386, as that was a valid condition to verify
...
git-svn-id: trunk@41731 -
2019-03-18 13:21:58 +00:00
Károly Balogh
5358851f84
* clean up some things regarding explicit paraloc handling. this should fix m68k-amiga and powerpc-morphos builds after r41716
...
git-svn-id: trunk@41730 -
2019-03-18 01:19:18 +00:00
Jonas Maebe
fcde89cb26
* support forcing to write the parameter alignment for parameters for LLVM,
...
even when it's the same as the stack alignment (it can also refer to the
alignment of the data pointed to by pointer parameters)
git-svn-id: branches/debug_eh@41729 -
2019-03-17 15:28:27 +00:00
Jonas Maebe
3b254affb7
* support for the individual alignment flags for the memcpy intrinsic of
...
LLVM 7.0
git-svn-id: branches/debug_eh@41728 -
2019-03-17 15:28:23 +00:00
Jonas Maebe
cf65c55b72
* support specifying the target LLVM/Xcode version
...
git-svn-id: branches/debug_eh@41727 -
2019-03-17 15:28:20 +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
1bb8bd471a
* fix msgtxt array size if the text size is an exact multiple of 240
...
git-svn-id: trunk@41725 -
2019-03-17 15:22:06 +00:00
Jonas Maebe
bde560dac2
* also accept {$elsif} after {$if(n)def} (mantis #34858 )
...
git-svn-id: trunk@41724 -
2019-03-17 15:20:22 +00:00
pierre
74fed2a4cd
Regenerate Makefile's after fpcmake change in commit #41721
...
git-svn-id: trunk@41723 -
2019-03-17 14:45:03 +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
nickysn
ef00eb228b
+ enable the internal sysinit for OpenBSD x86_64
...
git-svn-id: trunk@41709 -
2019-03-14 23:43:45 +00:00
nickysn
caf1b11db9
* initialize SysInitUnit in InitSysInitUnitName on BSD
...
git-svn-id: trunk@41700 -
2019-03-14 17:20:12 +00:00
nickysn
58d9e58742
* initialize prtobj and reorder in InitSysInitUnitName
...
git-svn-id: trunk@41699 -
2019-03-14 17:02:20 +00:00
nickysn
525eff2927
* initialize linklibc earlier (in InitSysInitUnitName); this is necessary,
...
because the sysinit unit name depends on whether libc is linked or not.
Helper function ModulesLinkToLibc copied from t_linux.pas
git-svn-id: trunk@41698 -
2019-03-14 16:47:34 +00:00
nickysn
dc32554556
* prtobj, linklibc and reorder converted from local to member variables of the class
...
git-svn-id: trunk@41697 -
2019-03-14 16:23:55 +00:00
nickysn
a15ec46751
* don't put the prtobj file in the BSD linker script, in case the current system uses sysinit
...
git-svn-id: trunk@41696 -
2019-03-14 15:57:09 +00:00
nickysn
89c921a11c
+ enabled PIC by default for i386-openbsd as well
...
git-svn-id: trunk@41675 -
2019-03-11 13:48:43 +00:00
nickysn
ac86980f8a
+ pass the -dynamic-linker option to the linker even when making a static binary
...
on OpenBSD, because that seems to be needed in order to produce a static
position independent executable in the correct format for that platform
git-svn-id: trunk@41668 -
2019-03-10 15:56:09 +00:00
florian
d657373933
* patch by J. Gareth Moreton which avoids that the optimizer causes reads of invalid memory, resolves #35187
...
git-svn-id: trunk@41667 -
2019-03-10 10:48:50 +00:00
nickysn
3a58a6261a
* link with -nopie on OpenBSD only if PIC code generation is disabled
...
git-svn-id: trunk@41652 -
2019-03-09 16:11:52 +00:00
Jonas Maebe
d34e0b091b
* fixed aarch64 shifterop parsing in inline assembly
...
git-svn-id: trunk@41650 -
2019-03-09 16:11:31 +00:00
nickysn
b659720f04
* Do not link to /usr/libexec/ld.so as a shared library on OpenBSD. Based on 3/3
...
of OpenBSD ports patch patch-fpcsrc_compiler_systems_t_bsd_pas
git-svn-id: trunk@41639 -
2019-03-08 16:04:48 +00:00
nickysn
bd9f6170cd
* always add -nopie to linker flags on OpenBSD. Based on 2/3 of OpenBSD ports
...
patch patch-fpcsrc_compiler_systems_t_bsd_pas
git-svn-id: trunk@41638 -
2019-03-08 16:01:30 +00:00
nickysn
c3c9e07867
* Correct library search path for OpenBSD. Based on 1/3 of OpenBSD ports patch
...
patch-fpcsrc_compiler_systems_t_bsd_pas
git-svn-id: trunk@41637 -
2019-03-08 15:59:00 +00:00
yury
b0535d8d0f
* ppudump: Fixed a warning regarding text clipping.
...
git-svn-id: trunk@41628 -
2019-03-07 10:36:05 +00:00
yury
54756c0f60
* ppudump: Fixed formatting of a error message.
...
git-svn-id: trunk@41627 -
2019-03-07 10:33:04 +00:00
yury
37941d03cc
* ppudump: Avoid using GetLastOSError on platforms that doesn't support it (e.g. go32v2).
...
git-svn-id: trunk@41625 -
2019-03-07 10:18:15 +00:00
pierre
973741c919
Fix tmoddiv4.pp test failure with -O1 option for powerpc64 as suggested by Jonas
...
git-svn-id: trunk@41610 -
2019-03-05 22:01:09 +00:00
Jonas Maebe
16cde0da15
* create LLVM TAsmCFI wrapper that calls through to the original TASmCFI for
...
pure assembler routines and for generating the CFI tables, and does nothing
for LLVM-handled routines (LLVM takes care of the CFI there)
git-svn-id: branches/debug_eh@41580 -
2019-03-03 17:15:09 +00:00
Jonas Maebe
efaa7d67bb
* enable Dwarf CFI using cfi_* directives for Darwin/x86 platforms
...
git-svn-id: branches/debug_eh@41579 -
2019-03-03 17:15:06 +00:00
Jonas Maebe
5d28e2156b
+ support for generating Dwarf CFI using .cfi_* directives
...
o adjust peephole optimisers so they don't remove cfi_endproc directives
in case of tail call optimisation
git-svn-id: branches/debug_eh@41578 -
2019-03-03 17:15:03 +00:00
Jonas Maebe
7de177e3f3
* fixed x86-64 NR_RETURN_ADDRESS_REG
...
git-svn-id: branches/debug_eh@41577 -
2019-03-03 17:14:59 +00:00
Jonas Maebe
866331de34
* fixed CFI registers for leave on x86-64, and place CFI directives closer to
...
the instructions they apply to
git-svn-id: branches/debug_eh@41576 -
2019-03-03 17:14:56 +00:00
Jonas Maebe
332af0bc4e
* completed license header
...
git-svn-id: branches/debug_eh@41575 -
2019-03-03 17:14:53 +00:00
florian
c03e4ca4e7
* get rid of current_asmdata.AsmCFI as TDwarfAsmCFI casts
...
git-svn-id: branches/debug_eh@41574 -
2019-03-03 16:07:11 +00:00
florian
357dd02da3
+ 64 bit support
...
git-svn-id: branches/debug_eh@41564 -
2019-03-02 23:04:13 +00:00
florian
367bc18bc5
* cfa for x86-64 fixed
...
git-svn-id: branches/debug_eh@41563 -
2019-03-02 23:03:32 +00:00
Jonas Maebe
62cef8eb2b
* initialize function result for variadic functions (fixup for r41420)
...
git-svn-id: trunk@41544 -
2019-03-02 09:37:49 +00:00
Jonas Maebe
50c82b6468
* synchronised with trunk till r41537
...
git-svn-id: branches/debug_eh@41538 -
2019-03-01 16:20:22 +00:00
Jonas Maebe
f78e2072a1
* fix for r41416: 64 bit values on 32 bit platforms can of course also be
...
passed in memory
git-svn-id: trunk@41526 -
2019-02-28 20:45:34 +00:00
florian
075e3da334
* better alignment values
...
git-svn-id: trunk@41521 -
2019-02-27 22:13:54 +00:00
Jonas Maebe
8f6820a9f1
* LLVM=: also merge varargs paralocs
...
git-svn-id: branches/debug_eh@41520 -
2019-02-27 21:13:49 +00:00
Jonas Maebe
e720a1f306
* moved tcgexceptionstatehandler to a new cgexcept unit
...
* fixed llvm cycle by overriding additional eh-related tcgprocinfo methods
git-svn-id: branches/debug_eh@41519 -
2019-02-27 21:13:45 +00:00
florian
fb5392573d
* tpsabiehprocinfo.setup_eh must check if really psabieh exception handling should be generated
...
git-svn-id: branches/debug_eh@41518 -
2019-02-27 20:25:18 +00:00
florian
ded001753d
+ initial native x86-64 support
...
git-svn-id: branches/debug_eh@41499 -
2019-02-26 22:08:20 +00:00
florian
0657ce7c02
* get rid of fpc_Resume
...
git-svn-id: branches/debug_eh@41476 -
2019-02-25 21:43:56 +00:00
florian
6b34e511a0
- removed cdecl from FPC_psabi_begin_catch
...
git-svn-id: branches/debug_eh@41475 -
2019-02-25 21:25:22 +00:00
Jonas Maebe
aba3f8f162
* fixed over-eager rejection of tobjecttype.fieldname expression after r40785
...
(mantis #35149 )
git-svn-id: trunk@41474 -
2019-02-25 21:17:24 +00:00
Jonas Maebe
c7834af354
* track va_uses_float_reg also for varargs functions without varargs
...
parameters (see e.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23070 )
git-svn-id: trunk@41472 -
2019-02-25 21:02:14 +00:00
florian
12a53ad454
* reduce number of (redundant) landing pads
...
* reduce number of (redundant) action lists
git-svn-id: branches/debug_eh@41470 -
2019-02-25 20:49:18 +00:00
Jonas Maebe
eb71a30933
* fix false possitive tconstexprint range errors after r41441 (mantis #35144 )
...
git-svn-id: trunk@41469 -
2019-02-25 20:48:49 +00:00
yury
a04e4971fc
* i386: Do not request GOT for every function call. GOT is requested only for external calls in thlcgcpu.a_call_name(). Local calls are always PC relative.
...
git-svn-id: trunk@41464 -
2019-02-25 15:48:41 +00:00
yury
039aee9568
* i386 PIC: Do not force EBX as a GOT register if tf_section_threadvars is not set. Actually forcing EBX here is a bad idea anyway.
...
git-svn-id: trunk@41463 -
2019-02-25 15:05:26 +00:00
yury
4da16992df
* i386: Minor PIC initialization improvement if the GOT register is forced to EBX.
...
git-svn-id: trunk@41462 -
2019-02-25 14:43:46 +00:00
yury
e5c2d13671
* Do not set pi_needs_got in current_procinfo.flags at the node level, since the GOT usage can only be estimated there. Instead set the pi_needs_got flag at places where the GOT register is accessed during the code generation. This eliminates generation of the unneeded initialization of the GOT register and fixes linker errors when the _GLOBAL_OFFSET_TABLE_ symbol is referenced but no actual GOT references are present.
...
git-svn-id: trunk@41460 -
2019-02-25 13:35:40 +00:00
yury
9f88cae771
* Removed inline, since inherited is not supported.
...
git-svn-id: trunk@41458 -
2019-02-25 11:27:54 +00:00