+ far pointer fixes in the internal compiler handling of ptr(const,const)

git-svn-id: trunk@24567 -
This commit is contained in:
nickysn 2013-05-24 12:42:43 +00:00
parent ed29f7a92d
commit a86cb5c600

View File

@ -2052,7 +2052,13 @@ implementation
{Don't construct pointers from negative values.}
if (vl.signed and (vl.svalue<0)) or (vl2.signed and (vl2.svalue<0)) then
cgmessage(parser_e_range_check_error);
hp:=cpointerconstnode.create((vl2.uvalue shl 4)+vl.uvalue,{$ifdef i386}voidnearfspointertype{$else}voidpointertype{$endif});
{$if defined(i8086)}
hp:=cpointerconstnode.create((vl2.uvalue shl 16)+vl.uvalue,voidfarpointertype);
{$elseif defined(i386)}
hp:=cpointerconstnode.create((vl2.uvalue shl 4)+vl.uvalue,voidnearfspointertype);
{$else}
hp:=cpointerconstnode.create((vl2.uvalue shl 4)+vl.uvalue,voidpointertype);
{$endif}
end
else
internalerror(88);