]> gcc.gnu.org Git - gcc.git/commitdiff
ia64.c (emit_insn_group_barriers): Special case epilogue_deallocate_stack.
authorRichard Henderson <rth@cygnus.com>
Tue, 27 Jun 2000 17:36:59 +0000 (10:36 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 27 Jun 2000 17:36:59 +0000 (10:36 -0700)
        * config/ia64/ia64.c (emit_insn_group_barriers): Special case
        epilogue_deallocate_stack.

        * config/ia64/ia64.c (ia64_print_operand) [case D]: Emit
        completers for UNORDERED and ORDERED as well.
        * config/ia64/ia64.md (bunordered, bordered): New.
        (sunordered, sordered): New.

From-SVN: r34734

gcc/ChangeLog
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.md

index 748c5f1d572c6d64fb79877d3716fcfbe6870825..ce47a96b677a680bde438afaee65809bab8a221e 100644 (file)
@@ -1,3 +1,13 @@
+2000-06-27  Richard Henderson  <rth@cygnus.com>
+
+       * config/ia64/ia64.c (emit_insn_group_barriers): Special case
+       epilogue_deallocate_stack.
+
+       * config/ia64/ia64.c (ia64_print_operand) [case D]: Emit
+       completers for UNORDERED and ORDERED as well.
+       * config/ia64/ia64.md (bunordered, bordered): New.
+       (sunordered, sordered): New.
+
 Tue Jun 27 12:14:12 MET DST 2000  Jan Hubicka  <jh@suse.cz>
 
        * genattrtab.c (write_attr_value): Do not abort for CONST_INT operands.
index d455d19cb887a621773e08bec6be9eb3c3e8c1eb..ca6ee297d065ba96d593746af7d42684b68e84cb 100644 (file)
@@ -1777,6 +1777,8 @@ ia64_print_operand (file, x, code)
      rtx    x;
      int    code;
 {
+  const char *str;
+
   switch (code)
     {
     case 0:
@@ -1796,7 +1798,22 @@ ia64_print_operand (file, x, code)
       }
 
     case 'D':
-      fputs (GET_CODE (x) == NE ? "neq" : GET_RTX_NAME (GET_CODE (x)), file);
+      switch (GET_CODE (x))
+       {
+       case NE:
+         str = "neq";
+         break;
+       case UNORDERED:
+         str = "unord";
+         break;
+       case ORDERED:
+         str = "ord";
+         break;
+       default:
+         str = GET_RTX_NAME (GET_CODE (x));
+         break;
+       }
+      fputs (str, file);
       return;
 
     case 'E':
@@ -1805,13 +1822,14 @@ ia64_print_operand (file, x, code)
 
     case 'F':
       if (x == CONST0_RTX (GET_MODE (x)))
-       fputs (reg_names [FR_REG (0)], file);
+       str = reg_names [FR_REG (0)];
       else if (x == CONST1_RTX (GET_MODE (x)))
-       fputs (reg_names [FR_REG (1)], file);
+       str = reg_names [FR_REG (1)];
       else if (GET_CODE (x) == REG)
-       fputs (reg_names [REGNO (x)], file);
+       str = reg_names [REGNO (x)];
       else
        abort ();
+      fputs (str, file);
       return;
 
     case 'I':
@@ -2834,8 +2852,15 @@ emit_insn_group_barriers (insns)
            break;
          else
            {
+             rtx pat = PATTERN (insn);
+
+             /* We play dependency tricks with the epilogue in order to
+                get proper schedules.  Undo this for dv analysis.  */
+             if (INSN_CODE (insn) == CODE_FOR_epilogue_deallocate_stack)
+               pat = XVECEXP (pat, 0, 0);
+
              memset (rws_insn, 0, sizeof (rws_insn));
-             need_barrier |= rtx_needs_barrier (PATTERN (insn), flags, 0);
+             need_barrier |= rtx_needs_barrier (pat, flags, 0);
 
              /* Check to see if the previous instruction was a volatile
                 asm.  */
index 4bcf8f6a682bb9d1d963d1db6c16a0d2a477ac60..bb9c3f328407cd73b349d929d36416aaa714692d 100644 (file)
   operands[3] = ia64_compare_op1;
 }")
 
+(define_expand "bunordered"
+  [(set (match_dup 1)
+       (unordered:CC (match_dup 2)
+                     (match_dup 3)))
+   (set (pc)
+       (if_then_else (ne:CC (match_dup 1)
+                            (const_int 0))
+                     (label_ref (match_operand 0 "" ""))
+                     (pc)))]
+  ""
+  "
+{
+  operands[1] = gen_reg_rtx (CCmode);
+  operands[2] = ia64_compare_op0;
+  operands[3] = ia64_compare_op1;
+}")
+
+(define_expand "bordered"
+  [(set (match_dup 1)
+       (ordered:CC (match_dup 2)
+                     (match_dup 3)))
+   (set (pc)
+       (if_then_else (ne:CC (match_dup 1)
+                            (const_int 0))
+                     (label_ref (match_operand 0 "" ""))
+                     (pc)))]
+  ""
+  "
+{
+  operands[1] = gen_reg_rtx (CCmode);
+  operands[2] = ia64_compare_op0;
+  operands[3] = ia64_compare_op1;
+}")
+
 (define_insn "*br_true"
   [(set (pc)
        (if_then_else (match_operator 0 "predicate_operator"
   operands[3] = ia64_compare_op1;
 }")
 
+(define_expand "sunordered"
+  [(set (match_dup 1)
+       (unordered:CC (match_dup 2)
+                     (match_dup 3)))
+   (set (match_operand:DI 0 "register_operand" "")
+       (ne:DI (match_dup 1) (const_int 0)))]
+  ""
+  "
+{
+  operands[1] = gen_reg_rtx (CCmode);
+  operands[2] = ia64_compare_op0;
+  operands[3] = ia64_compare_op1;
+}")
+
+(define_expand "sordered"
+  [(set (match_dup 1)
+       (ordered:CC (match_dup 2)
+                     (match_dup 3)))
+   (set (match_operand:DI 0 "register_operand" "")
+       (ne:DI (match_dup 1) (const_int 0)))]
+  ""
+  "
+{
+  operands[1] = gen_reg_rtx (CCmode);
+  operands[2] = ia64_compare_op0;
+  operands[3] = ia64_compare_op1;
+}")
+
 ;; Don't allow memory as destination here, because cmov/cmov/st is more
 ;; efficient than mov/mov/cst/cst.
 
This page took 0.085959 seconds and 5 git commands to generate.