mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-09 11:18:40 +02:00
* Make trgobj.uses_registers method return True when registers of appropriate type are specified in list of used registers (after assembler blocks), but not used otherwise. This is a missing piece of r30011, enabling code generator to actually save/restore such registers. Resolves #28421.
git-svn-id: trunk@32610 -
This commit is contained in:
parent
9d93c6f953
commit
c0eafe38aa
@ -227,6 +227,7 @@ unit rgobj;
|
|||||||
constrained_moves : Tlinkedlist;
|
constrained_moves : Tlinkedlist;
|
||||||
extended_backwards,
|
extended_backwards,
|
||||||
backwards_was_first : tbitset;
|
backwards_was_first : tbitset;
|
||||||
|
has_usedmarks: boolean;
|
||||||
|
|
||||||
{ Disposes of the reginfo array.}
|
{ Disposes of the reginfo array.}
|
||||||
procedure dispose_reginfo;
|
procedure dispose_reginfo;
|
||||||
@ -522,7 +523,7 @@ unit rgobj;
|
|||||||
|
|
||||||
function trgobj.uses_registers:boolean;
|
function trgobj.uses_registers:boolean;
|
||||||
begin
|
begin
|
||||||
result:=(maxreg>first_imaginary);
|
result:=(maxreg>first_imaginary) or has_usedmarks;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1733,7 +1734,10 @@ unit rgobj;
|
|||||||
end;
|
end;
|
||||||
ra_markused :
|
ra_markused :
|
||||||
if (supreg<first_imaginary) then
|
if (supreg<first_imaginary) then
|
||||||
|
begin
|
||||||
include(used_in_proc,supreg);
|
include(used_in_proc,supreg);
|
||||||
|
has_usedmarks:=true;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
{ constraints needs always to be updated }
|
{ constraints needs always to be updated }
|
||||||
add_constraints(reg);
|
add_constraints(reg);
|
||||||
|
Loading…
Reference in New Issue
Block a user