Browse Source

* fixed m68k compilation while sitting bored in the train

git-svn-id: trunk@1823 -
florian 19 years ago
parent
commit
d7a5ca107b
2 changed files with 20 additions and 7 deletions
  1. 20 6
      compiler/m68k/cpubase.pas
  2. 0 1
      compiler/x86/cpubase.pas

+ 20 - 6
compiler/m68k/cpubase.pas

@@ -168,12 +168,6 @@ unit cpubase;
         'ge','pl','gt','t','hi','vc','le','vs'
       );
 
-      inverse_cond:array[TAsmCond] of TAsmCond=(C_None,
-{$warning TODO, this is just a copy!}
-         C_CC,C_LS,C_CS,C_LT,C_EQ,C_MI,C_F,C_NE,
-         C_GE,C_PL,C_GT,C_T,C_HI,C_VC,C_LE,C_VS
-      );
-
 {*****************************************************************************
                                    Flags
 *****************************************************************************}
@@ -336,6 +330,9 @@ unit cpubase;
 
     function isaddressregister(reg : tregister) : boolean;
 
+    function inverse_cond(const c: TAsmCond): TAsmCond; {$ifdef USEINLINE}inline;{$endif USEINLINE}
+    function conditions_equal(const c1, c2: TAsmCond): boolean; {$ifdef USEINLINE}inline;{$endif USEINLINE}
+
 implementation
 
     uses
@@ -461,4 +458,21 @@ implementation
       end;
 
 
+    function inverse_cond(const c: TAsmCond): TAsmCond; {$ifdef USEINLINE}inline;{$endif USEINLINE}
+      const
+        inverse:array[TAsmCond] of TAsmCond=(C_None,
+{$warning TODO, this is just a copy!}
+           C_CC,C_LS,C_CS,C_LT,C_EQ,C_MI,C_F,C_NE,
+           C_GE,C_PL,C_GT,C_T,C_HI,C_VC,C_LE,C_VS
+        );
+      begin
+        result := inverse[c];
+      end;
+
+
+    function conditions_equal(const c1, c2: TAsmCond): boolean; {$ifdef USEINLINE}inline;{$endif USEINLINE}
+      begin
+        result := c1 = c2;
+      end;
+
 end.

+ 0 - 1
compiler/x86/cpubase.pas

@@ -467,5 +467,4 @@ implementation
       end;
 
 
-
 end.