Browse Source

+ added a nodetype parameter to TZ80AddNode.GetResFlags

git-svn-id: branches/z80@44730 -
nickysn 5 years ago
parent
commit
6b74573677
1 changed files with 11 additions and 11 deletions
  1. 11 11
      compiler/z80/nz80add.pas

+ 11 - 11
compiler/z80/nz80add.pas

@@ -34,7 +34,7 @@ interface
 
 
        TZ80AddNode = class(tcgaddnode)
        TZ80AddNode = class(tcgaddnode)
        private
        private
-         function  GetResFlags(unsigned:Boolean):TResFlags;
+         function  GetResFlags(unsigned:Boolean;anodetype:tnodetype):TResFlags;
        protected
        protected
          function pass_1 : tnode;override;
          function pass_1 : tnode;override;
          procedure second_cmpordinal;override;
          procedure second_cmpordinal;override;
@@ -62,9 +62,9 @@ interface
                                TZ80AddNode
                                TZ80AddNode
 *****************************************************************************}
 *****************************************************************************}
 
 
-    function TZ80AddNode.GetResFlags(unsigned:Boolean):TResFlags;
+    function TZ80AddNode.GetResFlags(unsigned: Boolean; anodetype: tnodetype): TResFlags;
       begin
       begin
-        case NodeType of
+        case anodetype of
           equaln:
           equaln:
             GetResFlags:=F_E;
             GetResFlags:=F_E;
           unequaln:
           unequaln:
@@ -74,7 +74,7 @@ interface
               begin
               begin
                 { signed }
                 { signed }
                 if nf_swapped in flags then
                 if nf_swapped in flags then
-                  case NodeType of
+                  case anodetype of
                     ltn:
                     ltn:
                       GetResFlags:=F_NotPossible;
                       GetResFlags:=F_NotPossible;
                     lten:
                     lten:
@@ -87,7 +87,7 @@ interface
                       internalerror(2014082020);
                       internalerror(2014082020);
                   end
                   end
                 else
                 else
-                  case NodeType of
+                  case anodetype of
                     ltn:
                     ltn:
                       GetResFlags:=F_M;
                       GetResFlags:=F_M;
                     lten:
                     lten:
@@ -104,7 +104,7 @@ interface
               begin
               begin
                 { unsigned }
                 { unsigned }
                 if nf_swapped in Flags then
                 if nf_swapped in Flags then
-                  case NodeType of
+                  case anodetype of
                     ltn:
                     ltn:
                       GetResFlags:=F_NotPossible;
                       GetResFlags:=F_NotPossible;
                     lten:
                     lten:
@@ -117,7 +117,7 @@ interface
                       internalerror(2014082022);
                       internalerror(2014082022);
                   end
                   end
                 else
                 else
-                  case NodeType of
+                  case anodetype of
                     ltn:
                     ltn:
                       GetResFlags:=F_C;
                       GetResFlags:=F_C;
                     lten:
                     lten:
@@ -206,7 +206,7 @@ interface
 
 
         if (opsize=OS_8) or ((opsize=OS_S8) and (NodeType in [equaln,unequaln])) then
         if (opsize=OS_8) or ((opsize=OS_S8) and (NodeType in [equaln,unequaln])) then
           begin
           begin
-            if getresflags(unsigned)=F_NotPossible then
+            if getresflags(unsigned,NodeType)=F_NotPossible then
               swapleftright;
               swapleftright;
 
 
             if left.location.loc<>LOC_REGISTER then
             if left.location.loc<>LOC_REGISTER then
@@ -248,11 +248,11 @@ interface
             end;
             end;
 
 
             location_reset(location,LOC_FLAGS,OS_NO);
             location_reset(location,LOC_FLAGS,OS_NO);
-            location.resflags:=getresflags(unsigned);
+            location.resflags:=getresflags(unsigned,NodeType);
           end
           end
         else if opsize=OS_S8 then
         else if opsize=OS_S8 then
           begin
           begin
-            if getresflags(unsigned)=F_NotPossible then
+            if getresflags(unsigned,NodeType)=F_NotPossible then
               swapleftright;
               swapleftright;
 
 
             if left.location.loc<>LOC_REGISTER then
             if left.location.loc<>LOC_REGISTER then
@@ -298,7 +298,7 @@ interface
             cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_A);
             cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_A);
 
 
             location_reset(location,LOC_FLAGS,OS_NO);
             location_reset(location,LOC_FLAGS,OS_NO);
-            location.resflags:=getresflags(unsigned);
+            location.resflags:=getresflags(unsigned,NodeType);
           end
           end
         else
         else
           internalerror(2020040401);
           internalerror(2020040401);