mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 10:20:21 +02:00
* Do not use stack parameter location for spilling if its size is less than the register size for all CPU targets except x86.
git-svn-id: trunk@46801 -
This commit is contained in:
parent
93eef547ae
commit
e159c92967
@ -625,8 +625,18 @@ implementation
|
||||
regtype:=getregtype(reg);
|
||||
while true do
|
||||
begin
|
||||
cg.rg[regtype].set_reg_initial_location(reg,loc.reference);
|
||||
regsize:=tcgsize2size[reg_cgsize(reg)];
|
||||
{$ifndef x86}
|
||||
{ The size of the stack parameter must be not less than
|
||||
the size of the register because the spilling code for
|
||||
most CPU targets spills whole registers.
|
||||
|
||||
Spilling of sub registers is supported for x86.
|
||||
}
|
||||
if regsize>tcgsize2size[paraloc^.Size] then
|
||||
break;
|
||||
{$endif x86}
|
||||
cg.rg[regtype].set_reg_initial_location(reg,loc.reference);
|
||||
dec(size,regsize);
|
||||
if size<=0 then
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user