* more fixes for float parameter handling on arm

git-svn-id: trunk@728 -
This commit is contained in:
florian 2005-07-22 20:14:03 +00:00
parent 6171499d15
commit 32b96e75f3
2 changed files with 21 additions and 10 deletions

View File

@ -992,15 +992,26 @@ implementation
var var
ref : treference; ref : treference;
begin begin
cgpara.check_simple_location;
case cgpara.location^.loc of case cgpara.location^.loc of
LOC_FPUREGISTER,LOC_CFPUREGISTER: LOC_FPUREGISTER,LOC_CFPUREGISTER:
begin
cgpara.check_simple_location;
a_loadfpu_reg_reg(list,size,r,cgpara.location^.register); a_loadfpu_reg_reg(list,size,r,cgpara.location^.register);
end;
LOC_REFERENCE,LOC_CREFERENCE: LOC_REFERENCE,LOC_CREFERENCE:
begin begin
cgpara.check_simple_location;
reference_reset_base(ref,cgpara.location^.reference.index,cgpara.location^.reference.offset); reference_reset_base(ref,cgpara.location^.reference.index,cgpara.location^.reference.offset);
a_loadfpu_reg_ref(list,size,r,ref); a_loadfpu_reg_ref(list,size,r,ref);
end end;
LOC_REGISTER,LOC_CREGISTER:
begin
{ paramfpu_ref does the check_simpe_location check here if necessary }
tg.GetTemp(list,TCGSize2Size[size],tt_normal,ref);
a_loadfpu_reg_ref(list,size,r,ref);
a_paramfpu_ref(list,size,ref,cgpara);
tg.Ungettemp(list,ref);
end;
else else
internalerror(2002071004); internalerror(2002071004);
end; end;
@ -1020,7 +1031,7 @@ implementation
reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset); reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset);
{ concatcopy should choose the best way to copy the data } { concatcopy should choose the best way to copy the data }
g_concatcopy(list,ref,href,tcgsize2size[size]); g_concatcopy(list,ref,href,tcgsize2size[size]);
end end;
else else
internalerror(200402201); internalerror(200402201);
end; end;

View File

@ -202,7 +202,7 @@ implementation
cg.a_paramfpu_reg(exprasmlist,left.location.size,left.location.register,tempcgpara); cg.a_paramfpu_reg(exprasmlist,left.location.size,left.location.register,tempcgpara);
end; end;
else else
internalerror(2002042433); internalerror(200204249);
end; end;
LOC_FPUREGISTER, LOC_FPUREGISTER,
LOC_CFPUREGISTER: LOC_CFPUREGISTER:
@ -224,8 +224,8 @@ implementation
cg.a_param_ref(exprasmlist,left.location.size,left.location.reference,tempcgpara); cg.a_param_ref(exprasmlist,left.location.size,left.location.reference,tempcgpara);
end; end;
{$endif x86_64} {$endif x86_64}
{$ifdef sparc} {$if defined(sparc) or defined(arm)}
{ sparc pushes floats in normal registers } { sparc and arm pass floats in normal registers }
LOC_REGISTER, LOC_REGISTER,
LOC_CREGISTER, LOC_CREGISTER,
{$endif sparc} {$endif sparc}
@ -254,7 +254,7 @@ implementation
end; end;
{$endif x86_64} {$endif x86_64}
{$if defined(sparc) or defined(arm) } {$if defined(sparc) or defined(arm) }
{ sparc and arm passes floats in normal registers } { sparc and arm pass floats in normal registers }
LOC_REGISTER, LOC_REGISTER,
LOC_CREGISTER, LOC_CREGISTER,
{$endif sparc} {$endif sparc}