mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 23:59:10 +02:00
+ introduced TAOptBase.RegistersInterfere (which might not always be equivalent to SuperRegistersEqual)
git-svn-id: trunk@45339 -
This commit is contained in:
parent
4263ff44c1
commit
531cc0ab0d
@ -105,6 +105,9 @@ unit aoptbase;
|
|||||||
{ compares reg1 and reg2 having the same type and being the same super registers
|
{ compares reg1 and reg2 having the same type and being the same super registers
|
||||||
so the register size is neglected }
|
so the register size is neglected }
|
||||||
class function SuperRegistersEqual(reg1,reg2 : TRegister) : Boolean; static; {$ifdef USEINLINE}inline;{$endif}
|
class function SuperRegistersEqual(reg1,reg2 : TRegister) : Boolean; static; {$ifdef USEINLINE}inline;{$endif}
|
||||||
|
|
||||||
|
{ returns true if changing reg1 changes reg2 or vice versa }
|
||||||
|
class function RegistersInterfere(reg1,reg2 : TRegister) : Boolean; static; {$ifdef USEINLINE}inline;{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function labelCanBeSkipped(p: tai_label): boolean; {$ifdef USEINLINE}inline;{$endif}
|
function labelCanBeSkipped(p: tai_label): boolean; {$ifdef USEINLINE}inline;{$endif}
|
||||||
@ -344,6 +347,16 @@ unit aoptbase;
|
|||||||
{$endif Z80}
|
{$endif Z80}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
class function TAOptBase.RegistersInterfere(reg1,reg2 : TRegister) : Boolean; static; {$ifdef USEINLINE}inline;{$endif}
|
||||||
|
begin
|
||||||
|
{$ifdef Z80}
|
||||||
|
result:=registers_interfere(reg1,reg2);
|
||||||
|
{$else Z80}
|
||||||
|
result:=SuperRegistersEqual(reg1,reg2);
|
||||||
|
{$endif Z80}
|
||||||
|
end;
|
||||||
|
|
||||||
{ ******************* Processor dependent stuff *************************** }
|
{ ******************* Processor dependent stuff *************************** }
|
||||||
|
|
||||||
Function TAOptBase.RegMaxSize(Reg: TRegister): TRegister;
|
Function TAOptBase.RegMaxSize(Reg: TRegister): TRegister;
|
||||||
|
Loading…
Reference in New Issue
Block a user