mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-06 09:36:15 +02:00
+ GetOffsetReg64
git-svn-id: trunk@22837 -
This commit is contained in:
parent
a3dff44489
commit
d1b2a7732a
@ -317,7 +317,10 @@ unit cpubase;
|
|||||||
{ returns the last virtual register }
|
{ returns the last virtual register }
|
||||||
function GetLastReg(const r : TRegister) : TRegister;
|
function GetLastReg(const r : TRegister) : TRegister;
|
||||||
|
|
||||||
|
{ returns the register with the offset of ofs of a continuous set of register starting with r }
|
||||||
function GetOffsetReg(const r : TRegister;ofs : shortint) : TRegister;
|
function GetOffsetReg(const r : TRegister;ofs : shortint) : TRegister;
|
||||||
|
{ returns the register with the offset of ofs of a continuous set of register starting with r and being continued with rhi }
|
||||||
|
function GetOffsetReg64(const r,rhi: TRegister;ofs : shortint): TRegister;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -463,4 +466,13 @@ unit cpubase;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function GetOffsetReg64(const r,rhi: TRegister;ofs : shortint): TRegister;
|
||||||
|
begin
|
||||||
|
if ofs>3 then
|
||||||
|
result:=TRegister(longint(rhi)+ofs-4)
|
||||||
|
else
|
||||||
|
result:=TRegister(longint(r)+ofs);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user