mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 11:09:14 +02:00
+ far pointer support in tpointerconstnode
git-svn-id: trunk@24566 -
This commit is contained in:
parent
fe404d2891
commit
ed29f7a92d
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user