mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 21:33:17 +02:00
* fixed a_param_ref for source sizes < 8 bytes
git-svn-id: trunk@10505 -
This commit is contained in:
parent
dd38ec2d36
commit
a6b9b3e00a
@ -109,15 +109,32 @@ unit cgcpu;
|
|||||||
tmpref, ref: treference;
|
tmpref, ref: treference;
|
||||||
location: pcgparalocation;
|
location: pcgparalocation;
|
||||||
sizeleft: aint;
|
sizeleft: aint;
|
||||||
|
sourcesize: tcgsize;
|
||||||
begin
|
begin
|
||||||
location := paraloc.location;
|
location := paraloc.location;
|
||||||
tmpref := r;
|
tmpref := r;
|
||||||
sizeleft := paraloc.intsize;
|
{ make sure we handle passing a 32 bit value in memory to a }
|
||||||
|
{ 64 bit register location etc. correctly }
|
||||||
|
if (size<>OS_NO) and
|
||||||
|
(tcgsize2size[size]<paraloc.intsize) then
|
||||||
|
begin
|
||||||
|
paraloc.check_simple_location;
|
||||||
|
if not(location^.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
||||||
|
internalerror(2008031801);
|
||||||
|
sizeleft:=tcgsize2size[size]
|
||||||
|
end
|
||||||
|
else
|
||||||
|
sizeleft:=paraloc.intsize;
|
||||||
while assigned(location) do
|
while assigned(location) do
|
||||||
begin
|
begin
|
||||||
case location^.loc of
|
case location^.loc of
|
||||||
LOC_REGISTER,LOC_CREGISTER:
|
LOC_REGISTER,LOC_CREGISTER:
|
||||||
a_load_ref_reg(list,location^.size,location^.size,tmpref,location^.register);
|
begin
|
||||||
|
sourcesize:=int_cgsize(sizeleft);
|
||||||
|
if (sourcesize=OS_NO) then
|
||||||
|
sourcesize:=location^.size;
|
||||||
|
a_load_ref_reg(list,sourcesize,location^.size,tmpref,location^.register);
|
||||||
|
end;
|
||||||
LOC_REFERENCE:
|
LOC_REFERENCE:
|
||||||
begin
|
begin
|
||||||
reference_reset_base(ref,location^.reference.index,location^.reference.offset);
|
reference_reset_base(ref,location^.reference.index,location^.reference.offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user