+ added rtl helper for huge pointer subtraction

git-svn-id: trunk@28178 -
This commit is contained in:
nickysn 2014-07-06 19:15:14 +00:00
parent f98cd634fb
commit 13646c7afe
2 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,11 @@ begin
fpc_hugeptr_sub_longint_normalized:=HugePointer(Ptr(linear shr 4,linear and $F));
end;
function fpc_hugeptr_sub_hugeptr(p1, p2: HugePointer): LongInt; compilerproc;
begin
fpc_hugeptr_sub_hugeptr:=((LongInt(Seg(p1^)) shl 4)+Ofs(p1^))-((LongInt(Seg(p2^)) shl 4)+Ofs(p2^));
end;
procedure fpc_hugeptr_inc_longint(var p: HugePointer; n: LongInt); compilerproc;
var
o: LongInt;

View File

@ -753,6 +753,7 @@ function fpc_hugeptr_add_longint(p: HugePointer; n: LongInt): HugePointer; compi
function fpc_hugeptr_add_longint_normalized(p: HugePointer; n: LongInt): HugePointer; compilerproc;
function fpc_hugeptr_sub_longint(p: HugePointer; n: LongInt): HugePointer; compilerproc;
function fpc_hugeptr_sub_longint_normalized(p: HugePointer; n: LongInt): HugePointer; compilerproc;
function fpc_hugeptr_sub_hugeptr(p1, p2: HugePointer): LongInt; compilerproc;
procedure fpc_hugeptr_inc_longint(var p: HugePointer; n: LongInt); compilerproc;
procedure fpc_hugeptr_inc_longint_normalized(var p: HugePointer; n: LongInt); compilerproc;
procedure fpc_hugeptr_dec_longint(var p: HugePointer; n: LongInt); compilerproc;