Károly Balogh
deda4c8247
simplified some code and removed a no longer used const
...
git-svn-id: trunk@34378 -
2016-08-26 10:07:30 +00:00
pierre
be9e097841
Use new class TAsmDataDef as ancestor for TPPCASmData
...
git-svn-id: trunk@34376 -
2016-08-25 22:27:48 +00:00
pierre
628d7dcb05
Avoid resetting of casmdata from TPPCAsmData back to TAsmDataDef
...
git-svn-id: trunk@34375 -
2016-08-25 21:56:48 +00:00
Jonas Maebe
18d728eb72
* ensure that local variables and parameters moved to a parentfpstruct aren't
...
initialised and finalised twice (once at their original location, and once
when the parentfpstruct is initialised/finalised)
git-svn-id: trunk@34374 -
2016-08-24 16:41:07 +00:00
Jonas Maebe
18a59dddb9
* use ctai_typedconstbuilder.get_dynstring_rec() to get the recorddef representing
...
string constants instead of giving an internal error if we can't find it in
the current context (in most cases it will exist, but not when inlining a
routine from another unit that accesses a locally declared string constant)
git-svn-id: trunk@34373 -
2016-08-24 16:41:04 +00:00
Jonas Maebe
4a42d67b72
+ ttai_typedconstbuilder.get_dynstring_rec() class method to get a recorddef
...
that represents an ansi/unicode/widestring constant of a particular length
git-svn-id: trunk@34372 -
2016-08-24 16:41:02 +00:00
Jonas Maebe
e91ba32b7c
* changed the result of get_dynstring_rec_name() to TSymStr
...
git-svn-id: trunk@34371 -
2016-08-24 16:40:59 +00:00
florian
f274e316fe
+ search /usr/lib/powerpc-linux-gnu for powerpc startup files
...
git-svn-id: trunk@34365 -
2016-08-22 10:01:47 +00:00
pierre
22a7ce8972
Fix memory leak due to double srsym allocation
...
git-svn-id: trunk@34364 -
2016-08-21 22:26:59 +00:00
pierre
dfeb6e3ae1
Avoid memory leak on trecorddef.variantrecorddesc field
...
git-svn-id: trunk@34363 -
2016-08-21 22:25:13 +00:00
pierre
eefdf135a5
Always write filename, truncate directory part if needed
...
git-svn-id: trunk@34362 -
2016-08-21 22:24:07 +00:00
pierre
8d1467157c
Fix compiler compilation with -dHEAPTRC.
...
This was brkoken because the -dHEAPTRC option
adds ppheap unit at top of the uses clause in pp.pas source,
which leads to a change in the loading order of the units.
This order change revealed that initialization of fpkg unit
was supposed to happen after globals unit.
Fixed here by testing if initdoneprocs local variable is assigned,
both in register_initdone_proc and in allocinitdoneprocs,
to avoid double initialization.
git-svn-id: trunk@34361 -
2016-08-21 22:21:09 +00:00
pierre
ea4350d86a
Avoid memory leak on tppumodule.unitimportsymsderefs
...
git-svn-id: trunk@34360 -
2016-08-21 21:53:02 +00:00
Jonas Maebe
4eea5d9651
* override ttempinfoaccessor.settempinfoflags() for llvm and filter out
...
ti_may_be_in_reg flag (see comments)
git-svn-id: trunk@34359 -
2016-08-21 14:23:13 +00:00
Jonas Maebe
179c1ab328
* changed ttemp*node.tempinfo^.flags to a private field, and added setters
...
and getters for the ttemp*node classes instead
o this will allow descendants to prevent certain flags from being added
or removed. E.g. for LLVM, certain temps must never be put in registers
because it cannot typecast a value in a register from a non-record/array
type to an array type without forcing it to memory (so if that is done
on an lvalue, the result will be written to the memory temp instead of
to the register)
git-svn-id: trunk@34358 -
2016-08-21 14:23:09 +00:00
svenbarth
37c32f4b61
* generate indirect symbols for interface IID and IIDSTR (fixes cycling; I wonder why that worked on Windows without problems :/ )
...
git-svn-id: trunk@34353 -
2016-08-19 21:49:42 +00:00
svenbarth
f50671fe44
* reference the RTTI assembler symbols if they're queried from a different unit than the own they're declared in
...
git-svn-id: trunk@34347 -
2016-08-19 14:54:28 +00:00
svenbarth
4a9eaf5317
* use findunitsymtable() when checking the module id
...
git-svn-id: trunk@34344 -
2016-08-19 14:42:03 +00:00
svenbarth
8b853571c6
* don't generate a warning if a "generic" token follows while parsing procedure directives (let's hope we'll never have to add a "generic" directive :/ )
...
+ added test
git-svn-id: trunk@34343 -
2016-08-19 14:07:36 +00:00
svenbarth
54874cccd6
* reference the VMT's assembler symbol if it's from another unit
...
git-svn-id: trunk@34342 -
2016-08-19 14:00:24 +00:00
svenbarth
1bd5d030f5
* don't export the indirect symbols on platforms that require the import redirection as there the indirect ones will be created in the importing binary
...
git-svn-id: trunk@34341 -
2016-08-19 13:48:27 +00:00
svenbarth
f1cdb5c4e9
* don't export types that have been merely renamed (and thus are part of another unit and potentially another package altogether)
...
git-svn-id: trunk@34340 -
2016-08-19 13:29:33 +00:00
svenbarth
1c696b0e77
* use indirect reference for FPC_THREADVAR_RELOCATE if necessary
...
* reference FPC_THREADVAR_RELOCATE assembler symbol if necessary
git-svn-id: trunk@34339 -
2016-08-19 13:07:56 +00:00
svenbarth
fb6546972b
* IID and IIDStr references of the VMT's interface table need to be indirect
...
git-svn-id: trunk@34338 -
2016-08-19 13:06:26 +00:00
svenbarth
77de5dd968
* reference assembler symbol of FPC_EMPTYMETHOD using AB_EXTERNAL and not AB_GLOBAL
...
git-svn-id: trunk@34337 -
2016-08-19 12:42:14 +00:00
svenbarth
70fbe50bac
* reference the extern assembler symbol of the VMT when catching an exception if it's from another unit
...
git-svn-id: trunk@34336 -
2016-08-19 12:41:06 +00:00
svenbarth
0a1be7f985
* also export all public RTTI and (required) INIT symbols aside from the non-existing internal ones
...
git-svn-id: trunk@34318 -
2016-08-15 14:49:44 +00:00
svenbarth
a073b86b57
* move handling of typesym's defs from insert_export() to its own function export_typedef()
...
git-svn-id: trunk@34317 -
2016-08-15 14:38:10 +00:00
svenbarth
c2662bd96a
* mark defs created with create_global_internal() with df_internal so that they can be easily identified
...
git-svn-id: trunk@34316 -
2016-08-15 14:30:46 +00:00
svenbarth
ad2facb10d
* also add the forced indirect symbols of data symbols to the public assembler symbols
...
* export the forced indirect symbols of data symbols on systems without indirect imports
git-svn-id: trunk@34313 -
2016-08-14 15:37:52 +00:00
svenbarth
2808be3e20
+ add and use sysinit unit for Win64 (only one since we don't support cygwin and gprof there)
...
* switch Win64 to indirect entry information
git-svn-id: trunk@34307 -
2016-08-13 19:10:27 +00:00
Jonas Maebe
051317e82e
* load the function result from the parentfpstruct to its original location
...
in exit nodes, because the wrapping code added in
tnodeutils.wrap_proc_body() gets inserted before the exit label to which
the exit node jumps
git-svn-id: trunk@34305 -
2016-08-13 14:47:50 +00:00
Jonas Maebe
a31ca58593
* factored out the loading the function result from the parentfpstruct into
...
its original location so it can be reused elsewhere too
git-svn-id: trunk@34304 -
2016-08-13 14:47:47 +00:00
Jonas Maebe
8760a6fbf8
* set shiftval to 0 if we convert a reference to a register paraloc,
...
as the reference overlaid the shiftval field and hence it could
have any value
git-svn-id: trunk@34303 -
2016-08-13 14:47:44 +00:00
Jonas Maebe
7ebbb744e9
* also specify sret attribute at the caller side
...
git-svn-id: trunk@34302 -
2016-08-13 14:47:42 +00:00
Jonas Maebe
819f0c39fa
* specify the "byval" attribute also at the caller side
...
git-svn-id: trunk@34301 -
2016-08-13 14:47:39 +00:00
Jonas Maebe
f0bf3b364a
* fixed alignment of reference used to set the first char of a 1-byte
...
shortstring
git-svn-id: trunk@34300 -
2016-08-13 14:47:36 +00:00
Jonas Maebe
f417ed6576
* internalerror in case a reference's alignment is not set in
...
thlcgllvm.make_simple_ref_ptr()
git-svn-id: trunk@34299 -
2016-08-13 14:47:34 +00:00
Jonas Maebe
2f0c3ce8cc
* fixed updating the reference alignment in thlcgllvm.g_set_addr_nonbitpacked_field_ref()
...
git-svn-id: trunk@34298 -
2016-08-13 14:47:31 +00:00
Jonas Maebe
ade1d811b0
* update the alignment of the reference in thlcgobj.get_bit_const_ref_sref()
...
after adapting the offset
git-svn-id: trunk@34297 -
2016-08-13 14:47:29 +00:00
Jonas Maebe
de465e056b
* set the alignment resulting from an aligned() call to the actual natural
...
alignment of the resultdef rather than to 0 (required for llvm, and
cleaner since then the code generator knows the actual alignment)
git-svn-id: trunk@34296 -
2016-08-13 14:47:26 +00:00
Jonas Maebe
a83f3c1a45
* fix maximum common alignment calculation in g_concatcopy() (if the second
...
parameter of newalignment() is larger than the first, the result is always
1)
git-svn-id: trunk@34295 -
2016-08-13 14:47:23 +00:00
Jonas Maebe
f891788a86
* simplification of and fix for AArch64 cpupara.is_hfa_internal() (patch by
...
modulo7, mantis #30381 )
o check for array elements of size 0 does not make sense after we've
established it's an array of floats
o since the recursive call to is_hfa_internal() already checks for
floats, we don't have to do it before calling it again for the
elements of an array
o set the result to "true" if the array is small enough to be a HFA
git-svn-id: trunk@34293 -
2016-08-12 16:53:02 +00:00
svenbarth
a2bf4efce2
* use indirect imports for FPC_EMPTYCHAR if necessary
...
* make not of FPC_EMPTYCHAR as external assembler symbol
git-svn-id: trunk@34292 -
2016-08-12 14:20:17 +00:00
svenbarth
bf3c7144b0
* make not of public assembler symbols for variables and classes if necessary
...
git-svn-id: trunk@34291 -
2016-08-12 14:19:11 +00:00
Jonas Maebe
8e0ee6599c
* store parameters to inline routines that are already in a temp into a new
...
temp if the original temp was marked as ti_const, and the new parameter
gets modified (mantis #30015 )
git-svn-id: trunk@34289 -
2016-08-12 13:35:56 +00:00
Jonas Maebe
70b1b32722
* let inline parameter temps inherit the "const" property of const
...
parameters, so we don't apply reference counting to them (mantis #30323 )
git-svn-id: trunk@34288 -
2016-08-12 13:35:53 +00:00
Jonas Maebe
18580d3069
* when assigning a value to a temp marked as ti_const, do not immediately
...
release the source location in case it was also a temp. Reason: we
don't increase reference counts when assigning to a ti_const (they are
like const parameters), so the original value must stay alive until
the ti_const temp is freed
o free the original data in the ttempdelete node for the ti_const temp
o don't increase reference counts when assigning composite types to
ti_const temps either
git-svn-id: trunk@34287 -
2016-08-12 13:35:51 +00:00
Jonas Maebe
a3ca471d32
* factored out all the tests for whether we need to put inline parameters
...
in temps (no functional changes)
git-svn-id: trunk@34286 -
2016-08-12 13:35:48 +00:00
Jonas Maebe
8d1e8ea203
* fixed indentation in nonlocalvars()
...
git-svn-id: trunk@34285 -
2016-08-12 13:35:45 +00:00