Commit Graph

25 Commits

Author SHA1 Message Date
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
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jonas Maebe
8334597476 * a homogeneous float aggregate can maximally contain 4 elements
(mantis #27665)

git-svn-id: trunk@30229 -
2015-03-14 21:46:45 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jonas Maebe
42aca4db46 * pass managed function result addresses as a hidden first parameter instead
of in X8, as the ABI allows this deviation (see added comments) and it's
    required for some internal RTL code to call interface methods via RTTI

git-svn-id: trunk@29953 -
2015-02-23 22:55:08 +00:00
Jonas Maebe
e2d21a5716 * reuse simple memory paralocs, since we always setup a stack frame and
we can address them via the frame pointer

git-svn-id: trunk@29941 -
2015-02-23 22:54:12 +00:00
Jonas Maebe
41fba0c4f7 * switched to using the stack pointer as base register for the temp allocator
instead of the frame pointer register:
      1) we exactly know the offsets of the temps from the stack pointer
         after pass 1 (based on the require parameter stack size for called
         routines), while we don't know it for the frame pointer (it depends
         on the number of saved registers)
      2) temp offsets from the stack pointer are positive while those from
         the frame pointer are negative, and we can directly encode much
         bigger positive offsets in the instructions
   o move the stack pointer register to a virtual register in
     loadparentfpn, because many instructions cannot directly operate
     on/with the stack pointer
   o add the necessary register interference edges for the stack pointer
     register

git-svn-id: trunk@29938 -
2015-02-23 22:54:03 +00:00
Jonas Maebe
70fc5dcee3 * don't pass TP-style objects as HFA or similar, because the calling
convention code is triggered before the object structure has been
    finalised, so the result can be different in the interface and
    implementation. To solve this, something like r20161 has to be
    implemented for TP-style objects

git-svn-id: trunk@29930 -
2015-02-23 22:53:29 +00:00
Jonas Maebe
820de6a17b * pass "const" arrays always by reference, because there is a lot of hacky
code out there that relies on this, even though it's not supposed to be
    guaranteed in any way :(

git-svn-id: trunk@29874 -
2015-02-23 22:50:32 +00:00
Jonas Maebe
1c8eb58792 * adapted copyright statement
git-svn-id: trunk@29863 -
2015-02-23 22:49:58 +00:00
Jonas Maebe
2214966f26 * implemented parameter passing and function result locations
git-svn-id: trunk@29862 -
2015-02-23 22:49:55 +00:00
Jonas Maebe
7fbc44471b * made getparaloc ABI-compliant
git-svn-id: trunk@29860 -
2015-02-23 22:49:49 +00:00
Jonas Maebe
232599b429 * made push_addr_param() ABI-compliant
git-svn-id: trunk@29859 -
2015-02-23 22:49:46 +00:00
Jonas Maebe
e2c30eb0a1 * return base type from is_hfa()
git-svn-id: trunk@29858 -
2015-02-23 22:49:43 +00:00
Jonas Maebe
e7bbb31080 * implemented ret_in_param() according to the ABI
git-svn-id: trunk@29857 -
2015-02-23 22:49:40 +00:00
Jonas Maebe
4562731ad9 - removed custom getintparaloc()
git-svn-id: trunk@29856 -
2015-02-23 22:49:37 +00:00
Jonas Maebe
60768fcffe + implemented is_hfa()
git-svn-id: trunk@29855 -
2015-02-23 22:49:34 +00:00
Jonas Maebe
cd6e3d5622 * fixed another compilation error
git-svn-id: trunk@29838 -
2015-02-23 22:48:43 +00:00
florian
76c179fae8 * aarch64 compilation fixes
git-svn-id: trunk@28931 -
2014-10-26 08:35:13 +00:00
Jonas Maebe
99de108c68 * renamed all paramanagers to tcpuparamanager so the llvm paramanager can
derive from them without ifdefs

git-svn-id: branches/hlcgllvm@26039 -
2013-11-11 11:15:27 +00:00
svenbarth
7bad1763b8 Decrease amount of code duplication regarding handling of safecall and record constructors.
paramgr.pas, tparamanager:
    + add new method "handle_common_ret_in_param"
    * extract common code (safecall + record constructor handling) from "ret_in_param" to "handle_common_ret_in_param" and call the latter in "ret_in_param"
[aarch64,arm,avr,i386,x86_64]/cpupara.pas, tCPUparamanager.ret_in_param:
    * call "handle_common_ret_in_param" instead of implementing the same check again and again
ncgcal.pas, tcgcallnode.handle_return_value:
    * move the check for (record) constructors to "tparamanager.handle_common_ret_in_param"

git-svn-id: trunk@23520 -
2013-01-25 20:39:28 +00:00
paul
b2a613c17f compiler: implement record constructors + tests
git-svn-id: trunk@23395 -
2013-01-16 02:07:42 +00:00
paul
51825b6f2e compiler: change ret_in_param to accept tabstractprocdef instead of tproccalloption to allow check more options (required for record constructor implementation)
git-svn-id: trunk@23394 -
2013-01-16 01:14:23 +00:00
Jonas Maebe
69c29a415f * pass the procdef to getintparaloc instead of only the proccalloption, so
that the type of the parameters can be determined automatically
   o added compilerproc declarations for all helpers called in the compiler
     via their assembler name, so we can look up the corresponding procdef

git-svn-id: trunk@23325 -
2013-01-06 15:05:40 +00:00
florian
2aaa7514f4 + started cpupara for aarch64
git-svn-id: trunk@23029 -
2012-11-18 20:42:11 +00:00