+ far pointer support in tpointerconstnode

git-svn-id: trunk@24566 -
This commit is contained in:
nickysn 2013-05-24 12:41:53 +00:00
parent fe404d2891
commit ed29f7a92d
2 changed files with 9 additions and 0 deletions

View File

@ -103,7 +103,11 @@ interface
pointer(-1) will result in a pointer with the value
$fffffffffffffff on a 32bit machine if the compiler uses
int64 constants internally (JM) }
{$ifdef i8086}
TConstPtrUInt = LongWord; { 32-bit for far pointers support }
{$else i8086}
TConstPtrUInt = AWord;
{$endif i8086}
{ Use a variant record to be sure that the array if aligned correctly }
tdoublerec=record

View File

@ -724,6 +724,11 @@ implementation
begin
inherited create(pointerconstn);
{$ifdef i8086}
{ truncate near pointers }
if (def.typ<>pointerdef) or not (tpointerdef(def).x86pointertyp in [x86pt_far,x86pt_huge]) then
v := Word(v);
{$endif i8086}
value:=v;
typedef:=def;
end;