Commit Graph

17 Commits

Author SHA1 Message Date
Jonas Maebe
afd0ae44ee * use tprocvardef.getreusableprocaddr also for non-address-only copies of
proc(var)defs

git-svn-id: trunk@44517 -
2020-04-02 21:21:40 +00:00
Jonas Maebe
4ba19f5418 * add support for creating non-address-only procvars to
cprocvar.getreusableprocaddr()

git-svn-id: trunk@44516 -
2020-04-02 21:21:36 +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
acf02ab64b * when creating wrappers, add a prefix to parameter names to prevent them
hiding the method name of the wrapped routine
   o also add a few more '&' prefixes to the generated wrapper code to
     prevent issues when keywords are used as identifiers

git-svn-id: trunk@40634 -
2018-12-24 22:10:06 +00:00
Jonas Maebe
3b4011760a * cleaned up blockaddress instruction (add type rather than hardcoding it
in the assembler writer)
  * fixed taking the address of a label in a typed const for llvm (fixes
    tbs/tb0468a)

git-svn-id: trunk@40599 -
2018-12-20 21:22:44 +00:00
Jonas Maebe
4686f61002 * keep track of the temp position separately from the offset in references,
so that they can still be freed after the reference has been changed
    (e.g. in case of array indexing or record field accesses) (mantis #33628)

git-svn-id: trunk@38814 -
2018-04-22 17:03:16 +00:00
Jonas Maebe
3ea976fd2d * fixed compilation of llvm compiler after r34996
git-svn-id: trunk@35002 -
2016-11-27 21:44:26 +00:00
Jonas Maebe
a25ebbba3e + added volatility information to all memory references
o separate information for reading and writing, because e.g. in a
     try-block, only the writes to local variables and parameters are
     volatile (they have to be committed immediately in case the next
     instruction causes an exception)
   o for now, only references to absolute memory addresses are marked
     as volatile
   o the volatily information is (should be) properly maintained throughout
     all code generators for all archictures with this patch
   o no optimizers or other compiler infrastructure uses the volatility
     information yet
   o this functionality is not (yet) exposed at the language level, it
     is only for internal code generator use right now

git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00
Jonas Maebe
b2e99da3e6 * use tabstractprocdef.is_addressonly to determine whether a procvar is
stored in more than one register (has a self and a code pointer), instead
    of assuming it always occupies more than one register if the original
    procdef had a self pointer (can be different when getting the address
    of a static class procedure)

git-svn-id: trunk@34976 -
2016-11-26 21:51:18 +00:00
Jonas Maebe
ade45eb31a + support for llvm load nodes of labelsym using blockaddress()
git-svn-id: trunk@34945 -
2016-11-21 07:39:09 +00:00
Jonas Maebe
df9efdeb4c * fixed llvm types for loading the address of a nested routine
git-svn-id: trunk@32594 -
2015-12-05 18:03:45 +00:00
Jonas Maebe
e144ba05c1 * fixed storing "self" (nestedfpstruct) when taking the address of a nested
routine

git-svn-id: trunk@32551 -
2015-11-29 21:45:54 +00:00
Jonas Maebe
bd4787c716 * force complex procvars immediately to memory for llvm, so we don't have to
deal with the hacky register/registerhi complex locations

git-svn-id: trunk@32407 -
2015-11-21 12:36:48 +00:00
Jonas Maebe
f402b0d7df * changed getpointerdef() into a tpointerdef.getreusable() class method
o allows removing the ugly x86 hacks

git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
Jonas Maebe
bcd04953c2 * fixed open array constructors for llvm
git-svn-id: trunk@31057 -
2015-06-13 22:48:28 +00:00
Jonas Maebe
0867b6e4f8 * added missing {$i fpcdefs.inc}
git-svn-id: branches/hlcgllvm@28378 -
2014-08-10 19:40:34 +00:00
Jonas Maebe
d33035dca2 + llvm implementation of load nodes (inherit from tcgnestloadnode, because
support for loading data from parent routines in nested routines has to
    be implemented explicitly via records, like for the jvm target)

git-svn-id: branches/hlcgllvm@26049 -
2013-11-11 11:16:05 +00:00