mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 00:59:30 +02:00
+ New subtype of tai_regalloc, "ra_markused". It marks a physical register as used in procedure, triggering saving/restoring that register if it is non-volatile.
git-svn-id: trunk@30010 -
This commit is contained in:
parent
6f93505e08
commit
31fddaafe8
@ -334,7 +334,7 @@ interface
|
||||
mark_Position
|
||||
);
|
||||
|
||||
TRegAllocType = (ra_alloc,ra_dealloc,ra_sync,ra_resize);
|
||||
TRegAllocType = (ra_alloc,ra_dealloc,ra_sync,ra_resize,ra_markused);
|
||||
|
||||
TStabType = (stab_stabs,stab_stabn,stab_stabd,
|
||||
{ AIX/XCOFF stab types }
|
||||
@ -371,7 +371,7 @@ interface
|
||||
|
||||
|
||||
const
|
||||
regallocstr : array[tregalloctype] of string[10]=('allocated','released','sync','resized');
|
||||
regallocstr : array[tregalloctype] of string[10]=('allocated','released','sync','resized','used');
|
||||
tempallocstr : array[boolean] of string[10]=('released','allocated');
|
||||
stabtypestr : array[TStabType] of string[8]=(
|
||||
'stabs','stabn','stabd',
|
||||
@ -714,6 +714,7 @@ interface
|
||||
constructor dealloc(r : tregister;ainstr:tai);
|
||||
constructor sync(r : tregister);
|
||||
constructor resize(r : tregister);
|
||||
constructor markused(r : tregister);
|
||||
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
end;
|
||||
@ -2424,6 +2425,15 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_regalloc.markused(r : tregister);
|
||||
begin
|
||||
inherited create;
|
||||
typ:=ait_regalloc;
|
||||
ratype:=ra_markused;
|
||||
reg:=r;
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_regalloc.ppuload(t:taitype;ppufile:tcompilerppufile);
|
||||
begin
|
||||
inherited ppuload(t,ppufile);
|
||||
|
@ -1683,6 +1683,9 @@ unit rgobj;
|
||||
{$endif DEBUG_REGISTERLIFE}
|
||||
add_edges_used(supreg);
|
||||
end;
|
||||
ra_markused :
|
||||
if (supreg<first_imaginary) then
|
||||
include(used_in_proc,supreg);
|
||||
end;
|
||||
{ constraints needs always to be updated }
|
||||
add_constraints(reg);
|
||||
|
Loading…
Reference in New Issue
Block a user