(valid_dbcc_comparison_p): Don't test cc_prev_status here.
authorTorbjorn Granlund <tege@gnu.org>
Tue, 12 Mar 1996 15:07:49 +0000 (15:07 +0000)
committerTorbjorn Granlund <tege@gnu.org>
Tue, 12 Mar 1996 15:07:49 +0000 (15:07 +0000)
(flags_in_68881): New function.

From-SVN: r11516

gcc/config/m68k/m68k.c

index 707b682fa4fd3074b3aee3c433645e578e74255a..bf278e6263e39751afa7cfe678ea2b0ea7e91366 100644 (file)
@@ -569,13 +569,8 @@ valid_dbcc_comparison_p (x, mode)
      rtx x;
      enum machine_mode mode;
 {
-  /* We could add support for these in the future */
-  if (cc_prev_status.flags & CC_IN_68881)
-    return 0;
-
   switch (GET_CODE (x))
     {
-
       case EQ: case NE: case GTU: case LTU:
       case GEU: case LEU:
         return 1;
@@ -589,16 +584,23 @@ valid_dbcc_comparison_p (x, mode)
     }
 }
 
+/* Return non-zero if flags are currently in the 68881 flag register.  */
+int
+flags_in_68881 ()
+{
+  /* We could add support for these in the future */
+  return cc_status.flags & CC_IN_68881;
+}
+
 /* Output a dbCC; jCC sequence.  Note we do not handle the 
    floating point version of this sequence (Fdbcc).  We also
    do not handle alternative conditions when CC_NO_OVERFLOW is
-   set.  It is assumed that valid_dbcc_comparison_p will kick
-   those out before we get here.  */
+   set.  It is assumed that valid_dbcc_comparison_p and flags_in_68881 will
+   kick those out before we get here.  */
 
 output_dbcc_and_branch (operands)
      rtx *operands;
 {
   switch (GET_CODE (operands[3]))
     {
       case EQ: