Browse Source

+ introduced is_ref_opertype

git-svn-id: branches/z80@44763 -
nickysn 5 years ago
parent
commit
54ad38288b
1 changed files with 28 additions and 0 deletions
  1. 28 0
      compiler/z80/aasmcpu.pas

+ 28 - 0
compiler/z80/aasmcpu.pas

@@ -142,6 +142,7 @@ uses
     function is_ref_iy(const ref:treference): Boolean;
     function is_ref_ix_d(const ref:treference): Boolean;
     function is_ref_iy_d(const ref:treference): Boolean;
+    function is_ref_opertype(const ref:treference;opertype:toperandtype): Boolean;
 
 implementation
 
@@ -419,6 +420,33 @@ implementation
       end;
 
 
+    function is_ref_opertype(const ref: treference; opertype: toperandtype): Boolean;
+      begin
+        case opertype of
+          OT_REF_ADDR16:
+            result:=is_ref_addr16(ref);
+          OT_REF_BC:
+            result:=is_ref_bc(ref);
+          OT_REF_DE:
+            result:=is_ref_de(ref);
+          OT_REF_HL:
+            result:=is_ref_hl(ref);
+          OT_REF_SP:
+            result:=is_ref_sp(ref);
+          OT_REF_IX:
+            result:=is_ref_ix(ref);
+          OT_REF_IY:
+            result:=is_ref_iy(ref);
+          OT_REF_IX_d:
+            result:=is_ref_ix_d(ref);
+          OT_REF_IY_d:
+            result:=is_ref_iy_d(ref);
+          else
+            internalerror(2020041801);
+        end;
+      end;
+
+
     procedure InitAsm;
       begin
       end;