+ GetOffsetReg64

git-svn-id: trunk@22837 -
This commit is contained in:
florian 2012-10-23 20:16:13 +00:00
parent a3dff44489
commit d1b2a7732a

View File

@ -317,7 +317,10 @@ unit cpubase;
{ returns the last virtual register }
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;
{ 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
@ -463,4 +466,13 @@ unit cpubase;
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.