platforms that normally must copy value parameters on the caller side,
because
o if we copy them on the caller side, then the behaviour will be different
compared to other platforms if the called routine is implemented in C
(since they are passed by reference, changes to the array contents will
be visible on other platforms, while they wouldn't be visible if the
copy is made on the caller side)
o if we don't copy them on the caller nor on the callee side, then behaviour
will be different compared to other platforms if the called routine is
implemented in Pascal and modifies the array (since then changes won't be
visible on the caller side, except on platforms that normally perform
the copy on the caller side)
git-svn-id: trunk@29873 -
be copied on the caller instead of callee side
o mark Darwin/Aarch64 as such a target (any AArch64 target will be like
that normally, as its ABI specifies this behaviour)
o don't mark by-reference value parameters on such targets as
vo_has_local_copy, since a) they don't have one (the copy is on the
caller side), and b) this ensures that all code handling such
parameters automatically knows that they are still by reference
after the init code has run
o when making the copies on the caller side, don't increase the
reference count for managed types except for variants, just like
is done when making the copies on the callee side. This is because
the reference count increasing code on the callee side only runs
for non-assembler functions, and we cannot know 100% certain on the
caller side whether the called function is assembler or not (e.g. in
case of externally declared functions)
o maybe over time we can reuse the Pascal code in
tcallparanode.copy_value_by_ref_para to replace the equivalent code
in hlcgobj and ncgutil also on the caller side for other targets
git-svn-id: trunk@29870 -
hardcoded registers for the most part)
+ added extra g_exception_discard_reason() that can be called when we only
want to get rid of the currently pushed exception reason, and don't have
to load it (so it can do nothing on platforms that don't use push/pop)
git-svn-id: branches/hlcgllvm@28481 -
thlcgobj.paravarsym_set_initialloc_to_paraloc(): it has to be the type of
pointer in the base register, not the type of the variable (and since this
is a parameter on the stack, use voidstackpointertype rather than
getpointerdef() for i8086 compatibility)
git-svn-id: branches/hlcgllvm@28351 -
so that platform-specific versions of g_call_system_proc_intern() don't
have to take care of this (since these methods call random routines from
the system unit, this info may not yet be available)
git-svn-id: branches/hlcgllvm@28203 -
because they:
- worsen readability (especially if we add cpu8bitalu as well, for
completeness)
- are not needed, because the else clause of the previous if ensures that we
have (sizeleft<=sizeof(aint)) and sizeof(aint) follows the target cpu alu
size
git-svn-id: trunk@27664 -
symsym.pas, tfieldvarsym:
+ add new field fieldvarsym which holds a reference to a tfieldvarsym if the static sym was created based on such a symbol
+ add necessary methods and code to correctly load from and store to PPU
+ add new constructor create_from_fieldvar
symcreat.pas, make_field_static:
* use new create_from_fieldvar constructor instead of the default one
hlcgobj.pas, finalize_static_data:
* check whether the static var is based on a generic's class var
ppu.pas:
* increase PPU version
+ added test
git-svn-id: trunk@27466 -
the high level code generator. All hlcg code, except for the jvm code
generator, updated to use the new method. I didn't update jvm (it still uses
the method from cgutils), because I'm not familiar with that platform, so I
might get the types wrong.
git-svn-id: trunk@27309 -
required for the LLVM support (LLVM parameter support is not yet
included)
* always return the function return loc from a_call*, again as required
for the LLVM support
git-svn-id: branches/hlcgllvm@26992 -
+ x86 targets now directly call procedure variables located in references.
- a_call_ref method removed from tcg and thlcgobj.
git-svn-id: trunk@26666 -
temp we allocate, we set the base register to a newly allocated
R_TEMPREGISTER. This allows for uniquely identifying a temp even if its
offset is modified.
git-svn-id: branches/hlcgllvm@26033 -