|
@@ -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.
|