mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-04 06:20:45 +02:00
Ignore NR_DEFAULTFLAGS for ait_regalloc, because there is no default flags for JVM
This commit is contained in:
parent
c06a3f2ca3
commit
abee4d46b6
@ -362,45 +362,49 @@ implementation
|
|||||||
ait_regalloc:
|
ait_regalloc:
|
||||||
with Tai_regalloc(p) do
|
with Tai_regalloc(p) do
|
||||||
begin
|
begin
|
||||||
case getregtype(reg) of
|
{ NR_DEFAULTFLAGS is NR_NO for JVM CPU }
|
||||||
R_INTREGISTER:
|
if (reg<>NR_DEFAULTFLAGS) then
|
||||||
if getsubreg(reg)=R_SUBD then
|
begin
|
||||||
size:=4
|
case getregtype(reg) of
|
||||||
else
|
R_INTREGISTER:
|
||||||
size:=8;
|
if getsubreg(reg)=R_SUBD then
|
||||||
R_ADDRESSREGISTER:
|
size:=4
|
||||||
size:=4;
|
else
|
||||||
R_FPUREGISTER:
|
size:=8;
|
||||||
if getsubreg(reg)=R_SUBFS then
|
R_ADDRESSREGISTER:
|
||||||
size:=4
|
size:=4;
|
||||||
else
|
R_FPUREGISTER:
|
||||||
size:=8;
|
if getsubreg(reg)=R_SUBFS then
|
||||||
else
|
size:=4
|
||||||
internalerror(2010122912);
|
else
|
||||||
end;
|
size:=8;
|
||||||
case ratype of
|
else
|
||||||
ra_alloc :
|
internalerror(2010122912);
|
||||||
tg.gettemp(templist,
|
|
||||||
size,1,
|
|
||||||
tt_regallocator,spill_temps[getregtype(reg)]^[getsupreg(reg)]);
|
|
||||||
ra_dealloc :
|
|
||||||
begin
|
|
||||||
tg.ungettemp(templist,spill_temps[getregtype(reg)]^[getsupreg(reg)]);
|
|
||||||
{ don't invalidate the temp reference, may still be used one instruction
|
|
||||||
later }
|
|
||||||
end;
|
end;
|
||||||
else
|
case ratype of
|
||||||
;
|
ra_alloc :
|
||||||
end;
|
tg.gettemp(templist,
|
||||||
{ insert the tempallocation/free at the right place }
|
size,1,
|
||||||
list.insertlistbefore(p,templist);
|
tt_regallocator,spill_temps[getregtype(reg)]^[getsupreg(reg)]);
|
||||||
{ remove the register allocation info for the register
|
ra_dealloc :
|
||||||
(p.previous is valid because we just inserted the temp
|
begin
|
||||||
allocation/free before p) }
|
tg.ungettemp(templist,spill_temps[getregtype(reg)]^[getsupreg(reg)]);
|
||||||
q:=Tai(p.previous);
|
{ don't invalidate the temp reference, may still be used one instruction
|
||||||
list.remove(p);
|
later }
|
||||||
p.free;
|
end;
|
||||||
p:=q;
|
else
|
||||||
|
;
|
||||||
|
end;
|
||||||
|
{ insert the tempallocation/free at the right place }
|
||||||
|
list.insertlistbefore(p,templist);
|
||||||
|
{ remove the register allocation info for the register
|
||||||
|
(p.previous is valid because we just inserted the temp
|
||||||
|
allocation/free before p) }
|
||||||
|
q:=Tai(p.previous);
|
||||||
|
list.remove(p);
|
||||||
|
p.free;
|
||||||
|
p:=q;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
ait_instruction:
|
ait_instruction:
|
||||||
do_spill_replace_all(list,taicpu(p),spill_temps);
|
do_spill_replace_all(list,taicpu(p),spill_temps);
|
||||||
|
Loading…
Reference in New Issue
Block a user