mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 00:59:30 +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;
|
||||
extended_backwards,
|
||||
backwards_was_first : tbitset;
|
||||
has_usedmarks: boolean;
|
||||
|
||||
{ Disposes of the reginfo array.}
|
||||
procedure dispose_reginfo;
|
||||
@ -522,7 +523,7 @@ unit rgobj;
|
||||
|
||||
function trgobj.uses_registers:boolean;
|
||||
begin
|
||||
result:=(maxreg>first_imaginary);
|
||||
result:=(maxreg>first_imaginary) or has_usedmarks;
|
||||
end;
|
||||
|
||||
|
||||
@ -1733,7 +1734,10 @@ unit rgobj;
|
||||
end;
|
||||
ra_markused :
|
||||
if (supreg<first_imaginary) then
|
||||
include(used_in_proc,supreg);
|
||||
begin
|
||||
include(used_in_proc,supreg);
|
||||
has_usedmarks:=true;
|
||||
end;
|
||||
end;
|
||||
{ constraints needs always to be updated }
|
||||
add_constraints(reg);
|
||||
|
Loading…
Reference in New Issue
Block a user