Browse Source

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

git-svn-id: trunk@24567 -
nickysn 12 years ago
parent
commit
a86cb5c600
1 changed files with 7 additions and 1 deletions
  1. 7 1
      compiler/ninl.pas

+ 7 - 1
compiler/ninl.pas

@@ -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);