Explorar o código

+ moved handling of pointer comparison in pass_1 to new virtual method
taddnode.first_cmppointer. To be overriden for i8086 huge pointer comparisons.

git-svn-id: trunk@28156 -

nickysn %!s(int64=11) %!d(string=hai) anos
pai
achega
e80ecd4d5b
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      compiler/nadd.pas

+ 9 - 1
compiler/nadd.pas

@@ -60,6 +60,7 @@ interface
           { the code generator for performance reasons (JM)                 }
           function first_add64bitint: tnode; virtual;
           function first_addpointer: tnode; virtual;
+          function first_cmppointer: tnode; virtual;
 
           { override and return false if you can handle 32x32->64 }
           { bit multiplies directly in your code generator. If    }
@@ -2679,6 +2680,13 @@ implementation
       end;
 
 
+    function taddnode.first_cmppointer: tnode;
+      begin
+        result:=nil;
+        expectloc:=LOC_FLAGS;
+      end;
+
+
     function taddnode.first_addfloat : tnode;
       var
         procname: string[31];
@@ -3082,7 +3090,7 @@ implementation
               if nodetype in [addn,subn,muln,andn,orn,xorn] then
                 result:=first_addpointer
               else
-                expectloc:=LOC_FLAGS;
+                result:=first_cmppointer;
            end
 
          else if is_implicit_pointer_object_type(ld) then