i386.md (length_immediate): Use gcc_assert or gcc_unreachable, as appropriate.
authorNathan Sidwell <nathan@gcc.gnu.org>
Fri, 22 Apr 2005 08:42:25 +0000 (08:42 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 22 Apr 2005 08:42:25 +0000 (08:42 +0000)
* config/i386/i386.md (length_immediate): Use gcc_assert or
gcc_unreachable, as appropriate.
(*movsi_1, *movqi_1, reload_outqi, *movdi_1_rex64, *pushsf,
*pushsf_rex64, *truncxfsf2_mixed, *truncxfsf2_i387,
*truncxfdf2_mixed, *truncxfdf2_i387, *adddi_1_rex64,
*adddi_2_rex64, *adddi_3_rex64, *adddi_4_rex64, *adddi_5_rex64,
*addsi_1, addsi_1_zext, *addsi_2, *addsi_2_zext, *addsi_3,
*addsi_3_zext, *addsi_4, *addsi_5, *addhi_1_lea, *addhi_1,
*addhi_2, *addhi_3, *addhi_4, *addhi_5, *addqi_1_lea, *addqi_1,
*addqi_1_slp, *addqi_2, *addqi_3, *addqi_4, *addqi_5, addqi_ext_1,
*addqi_ext_1_rex64, *anddi_1_rex64, *andsi_1, *andhi_1,
*ashldi3_1_rex64, *ashldi3_cmp_rex64, *ashlsi3_1, *ashlsi3_1_zext,
*ashlsi3_cmp, *ashlsi3_cmp_zext, *ashlhi3_1_lea, *ashlhi3_1,
*ashlhi3_cmp, *ashlqi3_1_lea, *ashlqi3_1, *ashlqi3_cmp,
pro_epilogue_adjust_stack_1, pro_epilogue_adjust_stack_rex64,
pro_epilogue_adjust_stack_rex64_2, prefetch, *prefetch_sse,
*prefetch_sse_rex): Likewise.
* config/i386/predicates.md (x86_64_immediate_operand,
x86_64_zext_immediate_operand, symbolic_operand,
no_seg_address_operand, aligned_operand,
memory_displacement_operand): Likewise.
* config/i386/sse.md (*mov<mode>_internal,
*movv2df_internal): Likewise.

From-SVN: r98549

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/config/i386/predicates.md
gcc/config/i386/sse.md

index 6c76f29d00738233bf54ac45b33893ec3de52404..d6dd3953cccadbc2fea83808e3c36d5a0c48a09f 100644 (file)
@@ -1,11 +1,38 @@
+2005-04-22  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * config/i386/i386.md (length_immediate): Use gcc_assert or
+       gcc_unreachable, as appropriate.
+       (*movsi_1, *movqi_1, reload_outqi, *movdi_1_rex64, *pushsf,
+       *pushsf_rex64, *truncxfsf2_mixed, *truncxfsf2_i387,
+       *truncxfdf2_mixed, *truncxfdf2_i387, *adddi_1_rex64,
+       *adddi_2_rex64, *adddi_3_rex64, *adddi_4_rex64, *adddi_5_rex64,
+       *addsi_1, addsi_1_zext, *addsi_2, *addsi_2_zext, *addsi_3,
+       *addsi_3_zext, *addsi_4, *addsi_5, *addhi_1_lea, *addhi_1,
+       *addhi_2, *addhi_3, *addhi_4, *addhi_5, *addqi_1_lea, *addqi_1,
+       *addqi_1_slp, *addqi_2, *addqi_3, *addqi_4, *addqi_5, addqi_ext_1,
+       *addqi_ext_1_rex64, *anddi_1_rex64, *andsi_1, *andhi_1,
+       *ashldi3_1_rex64, *ashldi3_cmp_rex64, *ashlsi3_1, *ashlsi3_1_zext,
+       *ashlsi3_cmp, *ashlsi3_cmp_zext, *ashlhi3_1_lea, *ashlhi3_1,
+       *ashlhi3_cmp, *ashlqi3_1_lea, *ashlqi3_1, *ashlqi3_cmp,
+       pro_epilogue_adjust_stack_1, pro_epilogue_adjust_stack_rex64,
+       pro_epilogue_adjust_stack_rex64_2, prefetch, *prefetch_sse,
+       *prefetch_sse_rex): Likewise.
+       * config/i386/predicates.md (x86_64_immediate_operand,
+       x86_64_zext_immediate_operand, symbolic_operand,
+       no_seg_address_operand, aligned_operand,
+       memory_displacement_operand): Likewise.
+       * config/i386/sse.md (*mov<mode>_internal,
+       *movv2df_internal): Likewise.
+
 2005-04-22  Jan Hubicka  <jh@suse.cz>
 
        * Makefile.in (ipa.o, ipa-inline.o): New files.
        * cgraph.h (cgraph_remove_unreachable_nodes, cgraph_postorder,
        cgraph_decide_inlining_incrementally, cgraph_clone_inlined_nodes,
        cgraph_mark_inline_edge, cgraph_default_inline_p): Declare.
-       * cgraphunit.c (cgraph_default_inline_p, cgraph_decide_inlining_incrementally, 
-       ncalls_inlined, nfunctions_inlined, initial_insns, overall_insns,
+       * cgraphunit.c (cgraph_default_inline_p,
+       cgraph_decide_inlining_incrementally,  ncalls_inlined,
+       nfunctions_inlined, initial_insns, overall_insns, 
        cgraph_estimate_size_after_inlining, cgraph_estimate_growth,
        cgraph_clone_inlined_nodes, cgraph_mark_inline_edge,
        cgraph_mark_inline, cgraph_check_inline_limits,
index f60d3d2be25d0d16df4e9b6965f2e84cc2e37a36..66659ae5abc42f5f099d0fd97e1329f377bdfde3 100644 (file)
           (const_int 1)
         ]
         (symbol_ref "/* Update immediate_length and other attributes! */
-                     abort(),1")))
+                     gcc_unreachable (),1")))
 
 ;; The (bounding maximum) length of an instruction address.
 (define_attr "length_address" ""
       return "lea{l}\t{%1, %0|%0, %1}";
 
     default:
-      if (flag_pic && !LEGITIMATE_PIC_OPERAND_P (operands[1]))
-       abort();
+      gcc_assert (!flag_pic || LEGITIMATE_PIC_OPERAND_P (operands[1]));
       return "mov{l}\t{%1, %0|%0, %1}";
     }
 }
   switch (get_attr_type (insn))
     {
     case TYPE_IMOVX:
-      if (!ANY_QI_REG_P (operands[1]) && GET_CODE (operands[1]) != MEM)
-       abort ();
+      gcc_assert (ANY_QI_REG_P (operands[1]) || GET_CODE (operands[1]) == MEM);
       return "movz{bl|x}\t{%1, %k0|%k0, %1}";
     default:
       if (get_attr_mode (insn) == MODE_SI)
   rtx op0, op1, op2;
   op0 = operands[0]; op1 = operands[1]; op2 = operands[2];
 
-  if (reg_overlap_mentioned_p (op2, op0))
-    abort ();
+  gcc_assert (!reg_overlap_mentioned_p (op2, op0));
   if (! q_regs_operand (op1, QImode))
     {
       emit_insn (gen_movqi (op2, op1));
     case TYPE_LEA:
       return "lea{q}\t{%a1, %0|%0, %a1}";
     default:
-      if (flag_pic && !LEGITIMATE_PIC_OPERAND_P (operands[1]))
-       abort ();
+      gcc_assert (!flag_pic || LEGITIMATE_PIC_OPERAND_P (operands[1]));
       if (get_attr_mode (insn) == MODE_SI)
        return "mov{l}\t{%k1, %k0|%k0, %k1}";
       else if (which_alternative == 2)
       else
        return "movdqa\t{%1, %0|%0, %1}";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "ssemov,ssemov,ssemov")
       else
        return "movdqa\t{%1, %0|%0, %1}";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "*,*,ssemov,ssemov,ssemov")
        (match_operand:SF 1 "general_no_elim_operand" "f#rx,rFm#fx,x#rf"))]
   "!TARGET_64BIT"
 {
-  switch (which_alternative)
-    {
-    case 1:
-      return "push{l}\t%1";
-
-    default:
-      /* This insn should be already split before reg-stack.  */
-      abort ();
-    }
+  /* Anything else should be already split before reg-stack.  */
+  gcc_assert (which_alternative == 1);
+  return "push{l}\t%1";
 }
   [(set_attr "type" "multi,push,multi")
    (set_attr "mode" "SF,SI,SF")])
        (match_operand:SF 1 "nonmemory_no_elim_operand" "f#rx,rF#fx,x#rf"))]
   "TARGET_64BIT"
 {
-  switch (which_alternative)
-    {
-    case 1:
-      return "push{q}\t%q1";
-
-    default:
-      /* This insn should be already split before reg-stack.  */
-      abort ();
-    }
+  /* Anything else should be already split before reg-stack.  */
+  gcc_assert (which_alternative == 1);
+  return "push{q}\t%q1";
 }
   [(set_attr "type" "multi,push,multi")
    (set_attr "mode" "SF,DI,SF")])
       return "movq\t{%1, %0|%0, %1}";
 
     default:
-      abort();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov,fmov,fmov,imov,imov,ssemov,ssemov,ssemov,ssemov,mmxmov,mmxmov,mmxmov")
   "!TARGET_64BIT && !TARGET_INTEGER_DFMODE_MOVES"
 {
   /* This insn should be already split before reg-stack.  */
-  abort ();
+  gcc_unreachable ();
 }
   [(set_attr "type" "multi")
    (set_attr "mode" "DF,SI,SI,DF")])
   "TARGET_64BIT || TARGET_INTEGER_DFMODE_MOVES"
 {
   /* This insn should be already split before reg-stack.  */
-  abort ();
+  gcc_unreachable ();
 }
   [(set_attr "type" "multi")
    (set_attr "mode" "DF,SI,DF")])
        case MODE_TI:
          return "pxor\t%0, %0";
        default:
-         abort ();
+         gcc_unreachable ();
        }
     case 6:
     case 7:
        case MODE_V2SF:
          return "movlps\t{%1, %0|%0, %1}";
        default:
-         abort ();
+         gcc_unreachable ();
        }
 
     default:
-      abort();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov,fmov,fmov,multi,multi,ssemov,ssemov,ssemov,ssemov")
        case MODE_TI:
          return "pxor\t%0, %0";
        default:
-         abort ();
+         gcc_unreachable ();
        }
     case 6:
     case 7:
        case MODE_V2SF:
          return "movlps\t{%1, %0|%0, %1}";
        default:
-         abort ();
+         gcc_unreachable ();
        }
 
     default:
-      abort();
+      gcc_unreachable();
     }
 }
   [(set_attr "type" "fmov,fmov,fmov,multi,multi,ssemov,ssemov,ssemov,ssemov")
   "optimize_size"
 {
   /* This insn should be already split before reg-stack.  */
-  abort ();
+  gcc_unreachable ();
 }
   [(set_attr "type" "multi")
    (set_attr "mode" "XF,SI,SI")])
   "!optimize_size"
 {
   /* This insn should be already split before reg-stack.  */
-  abort ();
+  gcc_unreachable ();
 }
   [(set_attr "type" "multi")
    (set_attr "mode" "XF,SI")])
 
     case 3: case 4:
       return "#";
+    default:
+      gcc_unreachable ();
     }
-  abort();
 }
   [(set_attr "type" "fmov,fmov,fmov,multi,multi")
    (set_attr "mode" "XF,XF,XF,SI,SI")])
 
     case 3: case 4:
       return "#";
+
+    default:
+      gcc_unreachable ();
     }
-  abort();
 }
   [(set_attr "type" "fmov,fmov,fmov,multi,multi")
    (set_attr "mode" "XF,XF,XF,SI,SI")])
       else
        return "movdqa\t{%1, %0|%0, %1}";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "*,*,ssemov,ssemov,ssemov")
       return "cvtss2sd\t{%1, %0|%0, %1}";
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov,fmov,ssecvt")
         return "fst%z0\t%y0";
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov")
         return "fstp%z0\t%y0\n\tfld%z0\t%y0";
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov")
         return "fstp%z0\t%y0";
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov")
     case 2:
       return "cvtsd2ss\t{%1, %0|%0, %1}";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov,fmov,ssecvt")
     case 2:
       return "cvtsd2ss\t{%1, %0|%0, %1}";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov,multi,ssecvt")
     case 1:
       return "#";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "fmov,multi")
    (clobber (match_operand:SF 2 "memory_operand" "=X,m,m,m"))]
   "TARGET_MIX_SSE_I387"
 {
-  switch (which_alternative)
-    {
-    case 0:
-      if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
-       return "fstp%z0\t%y0";
-      else
-       return "fst%z0\t%y0";
-    default:
-      abort();
-    }
+  gcc_assert (!which_alternative);
+  if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
+    return "fstp%z0\t%y0";
+  else
+    return "fst%z0\t%y0";
 }
   [(set_attr "type" "fmov,multi,multi,multi")
    (set_attr "mode" "SF")])
    (clobber (match_operand:SF 2 "memory_operand" "=X,m,m"))]
   "TARGET_80387"
 {
-  switch (which_alternative)
-    {
-    case 0:
-      if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
-       return "fstp%z0\t%y0";
-      else
-       return "fst%z0\t%y0";
-    default:
-      abort ();
-    }
+  gcc_assert (!which_alternative);
+  if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
+    return "fstp%z0\t%y0";
+   else
+     return "fst%z0\t%y0";
 }
   [(set_attr "type" "fmov,multi,multi")
    (set_attr "mode" "SF")])
    (clobber (match_operand:DF 2 "memory_operand" "=X,m,m,m"))]
   "TARGET_SSE2 && TARGET_MIX_SSE_I387"
 {
-  switch (which_alternative)
-    {
-    case 0:
-      if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
-       return "fstp%z0\t%y0";
-      else
-       return "fst%z0\t%y0";
-    default:
-      abort();
-    }
-  abort ();
+  gcc_assert (!which_alternative);
+  if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
+    return "fstp%z0\t%y0";
+  else
+    return "fst%z0\t%y0";
 }
   [(set_attr "type" "fmov,multi,multi,multi")
    (set_attr "mode" "DF")])
    (clobber (match_operand:DF 2 "memory_operand" "=X,m,m"))]
   "TARGET_80387"
 {
-  switch (which_alternative)
-    {
-    case 0:
-      if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
-       return "fstp%z0\t%y0";
-      else
-       return "fst%z0\t%y0";
-    default:
-      abort ();
-    }
+  gcc_assert (!which_alternative);
+  if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
+    return "fstp%z0\t%y0";
+  else
+    return "fst%z0\t%y0";
 }
   [(set_attr "type" "fmov,multi,multi")
    (set_attr "mode" "DF")])
       return "lea{q}\t{%a2, %0|%0, %a2}";
 
     case TYPE_INCDEC:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{q}\t%0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{q}\t%0";
       else
-       abort ();
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{q}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
 
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{q}\t%0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{q}\t%0";
       else
-       abort ();
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{q}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* ???? We ought to handle there the 32bit case too
         - do we need new constraint?  */
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{q}\t%0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{q}\t%0";
       else
-       abort ();
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{q}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* ???? We ought to handle there the 32bit case too
         - do we need new constraint?  */
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[2] == constm1_rtx)
         return "inc{q}\t%0";
-      else if (operands[2] == const1_rtx)
-        return "dec{q}\t%0";
       else
-       abort();
+        {
+         gcc_assert (operands[2] == const1_rtx);
+          return "dec{q}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
       if ((INTVAL (operands[2]) == -128
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{q}\t%0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{q}\t%0";
       else
-       abort();
+        {
+          gcc_assert (operands[2] == constm1_rtx);
+          return "dec{q}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
       if (GET_CODE (operands[2]) == CONST_INT
       return "lea{l}\t{%a2, %0|%0, %a2}";
 
     case TYPE_INCDEC:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{l}\t%0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{l}\t%0";
       else
-       abort();
+       {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{l}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
 
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
         return "inc{l}\t%k0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{l}\t%k0";
       else
-       abort();
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{l}\t%k0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{l}\t%0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{l}\t%0";
       else
-       abort();
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{l}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
       if (GET_CODE (operands[2]) == CONST_INT
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
         return "inc{l}\t%k0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{l}\t%k0";
       else
-       abort();
+       {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{l}\t%k0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{l}\t%0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{l}\t%0";
       else
-       abort();
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{l}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
       if (GET_CODE (operands[2]) == CONST_INT
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
         return "inc{l}\t%k0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{l}\t%k0";
       else
-       abort();
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{l}\t%k0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[2] == constm1_rtx)
         return "inc{l}\t%0";
-      else if (operands[2] == const1_rtx)
-        return "dec{l}\t%0";
       else
-       abort();
+        {
+         gcc_assert (operands[2] == const1_rtx);
+          return "dec{l}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
       if ((INTVAL (operands[2]) == -128
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{l}\t%0";
-      else if (operands[2] == constm1_rtx)
-        return "dec{l}\t%0";
       else
-       abort();
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+          return "dec{l}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
       if (GET_CODE (operands[2]) == CONST_INT
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{w}\t%0";
-      else if (operands[2] == constm1_rtx)
-       return "dec{w}\t%0";
-      abort();
+      else
+       {
+         gcc_assert (operands[2] == constm1_rtx);
+         return "dec{w}\t%0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{w}\t%0";
-      else if (operands[2] == constm1_rtx)
-       return "dec{w}\t%0";
-      abort();
+      else
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+         return "dec{w}\t%0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{w}\t%0";
-      else if (operands[2] == constm1_rtx)
-       return "dec{w}\t%0";
-      abort();
+      else
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+         return "dec{w}\t%0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{w}\t%0";
-      else if (operands[2] == constm1_rtx)
-       return "dec{w}\t%0";
-      abort();
+      else
+        {
+         gcc_assert (operands[2] == constm1_rtx);
+         return "dec{w}\t%0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[2] == constm1_rtx)
         return "inc{w}\t%0";
-      else if (operands[2] == const1_rtx)
-        return "dec{w}\t%0";
       else
-       abort();
+       {
+         gcc_assert (operands[2] == const1_rtx);
+          return "dec{w}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
         Exceptions: -128 encodes smaller than 128, so swap sign and op.  */
       if ((INTVAL (operands[2]) == -128
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{w}\t%0";
-      else if (operands[2] == constm1_rtx)
-       return "dec{w}\t%0";
-      abort();
+      else
+       {
+         gcc_assert (operands[2] == constm1_rtx);
+         return "dec{w}\t%0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return widen ? "inc{l}\t%k0" : "inc{b}\t%0";
-      else if (operands[2] == constm1_rtx)
-       return widen ? "dec{l}\t%k0" : "dec{b}\t%0";
-      abort();
+      else
+       {
+         gcc_assert (operands[2] == constm1_rtx);
+         return widen ? "dec{l}\t%k0" : "dec{b}\t%0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return widen ? "inc{l}\t%k0" : "inc{b}\t%0";
-      else if (operands[2] == constm1_rtx)
-       return widen ? "dec{l}\t%k0" : "dec{b}\t%0";
-      abort();
+      else
+       {
+         gcc_assert (operands[2] == constm1_rtx);
+         return widen ? "dec{l}\t%k0" : "dec{b}\t%0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
     case TYPE_INCDEC:
       if (operands[1] == const1_rtx)
        return "inc{b}\t%0";
-      else if (operands[1] == constm1_rtx)
-       return "dec{b}\t%0";
-      abort();
+      else
+       {
+         gcc_assert (operands[1] == constm1_rtx);
+         return "dec{b}\t%0";
+       }
 
     default:
       /* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.  */
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{b}\t%0";
-      else if (operands[2] == constm1_rtx
-              || (GET_CODE (operands[2]) == CONST_INT
-                  && INTVAL (operands[2]) == 255))
-       return "dec{b}\t%0";
-      abort();
+      else
+        {
+         gcc_assert (operands[2] == constm1_rtx
+                     || (GET_CODE (operands[2]) == CONST_INT
+                         && INTVAL (operands[2]) == 255));
+         return "dec{b}\t%0";
+       }
 
     default:
       /* Make things pretty and `subb $4,%al' rather than `addb $-4, %al'.  */
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{b}\t%0";
-      else if (operands[2] == constm1_rtx
-              || (GET_CODE (operands[2]) == CONST_INT
-                  && INTVAL (operands[2]) == 255))
-       return "dec{b}\t%0";
-      abort();
+      else
+        {
+         gcc_assert (operands[2] == constm1_rtx
+                     || (GET_CODE (operands[2]) == CONST_INT
+                         && INTVAL (operands[2]) == 255));
+         return "dec{b}\t%0";
+       }
 
     default:
       /* Make things pretty and `subb $4,%al' rather than `addb $-4, %al'.  */
          || (GET_CODE (operands[2]) == CONST_INT
              && INTVAL (operands[2]) == 255))
         return "inc{b}\t%0";
-      else if (operands[2] == const1_rtx)
-        return "dec{b}\t%0";
       else
-       abort();
+       {
+         gcc_assert (operands[2] == const1_rtx);
+          return "dec{b}\t%0";
+       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (INTVAL (operands[2]) < 0)
         {
           operands[2] = GEN_INT (-INTVAL (operands[2]));
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{b}\t%0";
-      else if (operands[2] == constm1_rtx
-              || (GET_CODE (operands[2]) == CONST_INT
-                  && INTVAL (operands[2]) == 255))
-       return "dec{b}\t%0";
-      abort();
+      else
+        {
+         gcc_assert (operands[2] == constm1_rtx
+                     || (GET_CODE (operands[2]) == CONST_INT
+                         && INTVAL (operands[2]) == 255));
+         return "dec{b}\t%0";
+       }
 
     default:
       /* Make things pretty and `subb $4,%al' rather than `addb $-4, %al'.  */
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{b}\t%h0";
-      else if (operands[2] == constm1_rtx
-              || (GET_CODE (operands[2]) == CONST_INT
-                  && INTVAL (operands[2]) == 255))
-       return "dec{b}\t%h0";
-      abort();
+      else
+        {
+         gcc_assert (operands[2] == constm1_rtx
+                     || (GET_CODE (operands[2]) == CONST_INT
+                         && INTVAL (operands[2]) == 255));
+          return "dec{b}\t%h0";
+       }
 
     default:
       return "add{b}\t{%2, %h0|%h0, %2}";
     case TYPE_INCDEC:
       if (operands[2] == const1_rtx)
        return "inc{b}\t%h0";
-      else if (operands[2] == constm1_rtx
-              || (GET_CODE (operands[2]) == CONST_INT
-                  && INTVAL (operands[2]) == 255))
-       return "dec{b}\t%h0";
-      abort();
+      else
+        {
+         gcc_assert (operands[2] == constm1_rtx
+                     || (GET_CODE (operands[2]) == CONST_INT
+                         && INTVAL (operands[2]) == 255));
+          return "dec{b}\t%h0";
+        }
 
     default:
       return "add{b}\t{%2, %h0|%h0, %2}";
     }
   else
     {
-      if (true_regnum (operands[1]))
-       abort();
+      gcc_assert (!true_regnum (operands[1]));
       operands[4] = operands[1];
     }
 })
     }
   else
     {
-      if (true_regnum (operands[1]))
-       abort();
+      gcc_assert (!true_regnum (operands[1]));
       operands[4] = operands[1];
     }
 })
       {
        enum machine_mode mode;
 
-       if (GET_CODE (operands[2]) != CONST_INT)
-         abort ();
+       gcc_assert (GET_CODE (operands[2]) == CONST_INT);
         if (INTVAL (operands[2]) == 0xff)
          mode = QImode;
-       else if (INTVAL (operands[2]) == 0xffff)
-         mode = HImode;
        else
-         abort ();
+         {
+           gcc_assert (INTVAL (operands[2]) == 0xffff);
+           mode = HImode;
+         }
        
        operands[1] = gen_lowpart (mode, operands[1]);
        if (mode == QImode)
       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (get_attr_mode (insn) == MODE_SI)
        return "and{l}\t{%k2, %k0|%k0, %k2}";
       else
       {
        enum machine_mode mode;
 
-       if (GET_CODE (operands[2]) != CONST_INT)
-         abort ();
+       gcc_assert (GET_CODE (operands[2]) == CONST_INT);
         if (INTVAL (operands[2]) == 0xff)
          mode = QImode;
-       else if (INTVAL (operands[2]) == 0xffff)
-         mode = HImode;
        else
-         abort ();
+         {
+           gcc_assert (INTVAL (operands[2]) == 0xffff);
+           mode = HImode;
+         }
        
        operands[1] = gen_lowpart (mode, operands[1]);
        if (mode == QImode)
       }
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       return "and{l}\t{%2, %0|%0, %2}";
     }
 }
   switch (get_attr_type (insn))
     {
     case TYPE_IMOVX:
-      if (GET_CODE (operands[2]) != CONST_INT)
-       abort ();
-      if (INTVAL (operands[2]) == 0xff)
-       return "movz{bl|x}\t{%b1, %k0|%k0, %b1}";
-      abort ();
+      gcc_assert (GET_CODE (operands[2]) == CONST_INT);
+      gcc_assert (INTVAL (operands[2]) == 0xff);
+      return "movz{bl|x}\t{%b1, %k0|%k0, %b1}";
 
     default:
-      if (! rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
 
       return "and{w}\t{%2, %0|%0, %2}";
     }
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
-      if (!rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       return "add{q}\t{%0, %0|%0, %0}";
 
     case TYPE_LEA:
-      if (GET_CODE (operands[2]) != CONST_INT
-         || (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > 3)
-       abort ();
+      gcc_assert (GET_CODE (operands[2]) == CONST_INT);
+      gcc_assert ((unsigned HOST_WIDE_INT) INTVAL (operands[2]) <= 3);
       operands[1] = gen_rtx_MULT (DImode, operands[1],
                                  GEN_INT (1 << INTVAL (operands[2])));
       return "lea{q}\t{%a1, %0|%0, %a1}";
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       return "add{q}\t{%0, %0|%0, %0}";
 
     default:
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
-      if (!rtx_equal_p (operands[0], operands[1]))
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       return "add{l}\t{%0, %0|%0, %0}";
 
     case TYPE_LEA:
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       return "add{l}\t{%k0, %k0|%k0, %k0}";
 
     case TYPE_LEA:
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       return "add{l}\t{%0, %0|%0, %0}";
 
     default:
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       return "add{l}\t{%k0, %k0|%k0, %k0}";
 
     default:
     case TYPE_LEA:
       return "#";
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       return "add{w}\t{%0, %0|%0, %0}";
 
     default:
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       return "add{w}\t{%0, %0|%0, %0}";
 
     default:
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       return "add{w}\t{%0, %0|%0, %0}";
 
     default:
     case TYPE_LEA:
       return "#";
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       if (REG_P (operands[1]) && !ANY_QI_REG_P (operands[1]))
         return "add{l}\t{%k0, %k0|%k0, %k0}";
       else
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       if (REG_P (operands[1]) && !ANY_QI_REG_P (operands[1]))
         return "add{l}\t{%k0, %k0|%k0, %k0}";
       else
   switch (get_attr_type (insn))
     {
     case TYPE_ALU:
-      if (operands[2] != const1_rtx)
-       abort ();
+      gcc_assert (operands[2] == const1_rtx);
       return "add{b}\t{%0, %0|%0, %0}";
 
     default:
       return "lea{l}\t{%a2, %0|%0, %a2}";
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set (attr "type")
       return "lea{q}\t{%a2, %0|%0, %a2}";
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set (attr "type")
       return "lea{q}\t{%a2, %0|%0, %a2}";
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "alu,lea")
   int rw = INTVAL (operands[1]);
   int locality = INTVAL (operands[2]);
 
-  if (rw != 0 && rw != 1)
-    abort ();
-  if (locality < 0 || locality > 3)
-    abort ();
-  if (GET_MODE (operands[0]) != Pmode && GET_MODE (operands[0]) != VOIDmode)
-    abort ();
+  gcc_assert (rw == 0 || rw == 1);
+  gcc_assert (locality >= 0 && locality <= 3);
+  gcc_assert (GET_MODE (operands[0]) == Pmode
+             || GET_MODE (operands[0]) == VOIDmode);
 
   /* Use 3dNOW prefetch in case we are asking for write prefetch not
      supported by SSE counterpart or the SSE prefetch is not available
   };
 
   int locality = INTVAL (operands[1]);
-  if (locality < 0 || locality > 3)
-    abort ();
+  gcc_assert (locality >= 0 && locality <= 3);
 
   return patterns[locality];  
 }
   };
 
   int locality = INTVAL (operands[1]);
-  if (locality < 0 || locality > 3)
-    abort ();
+  gcc_assert (locality >= 0 && locality <= 3);
 
   return patterns[locality];  
 }
index 668c7c061e5f9d0d5e5fbd6117ab1700b503f029..0d1546808c5404d7db6b3e6263c676c6219e8a35 100644 (file)
       break;
 
       default:
-       abort ();
+       gcc_unreachable ();
     }
 
   return 0;
       break;
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
   return 0;
 })
       return 0;
 
     default:
-      abort ();
+      gcc_unreachable ();
     }
 })
 
   (match_operand 0 "address_operand")
 {
   struct ix86_address parts;
-  if (! ix86_decompose_address (op, &parts))
-    abort ();
+  int ok;
+
+  ok = ix86_decompose_address (op, &parts);
+  gcc_assert (ok);
   return parts.seg == SEG_DEFAULT;
 })
 
   (match_operand 0 "general_operand")
 {
   struct ix86_address parts;
+  int ok;
 
   /* Registers and immediate operands are always "aligned".  */
   if (GET_CODE (op) != MEM)
     return 1;
 
   /* Decode the address.  */
-  if (!ix86_decompose_address (op, &parts))
-    abort ();
+  ok = ix86_decompose_address (op, &parts);
+  gcc_assert (ok);
 
   /* Look for some component that isn't known to be aligned.  */
   if (parts.index)
   (match_operand 0 "memory_operand")
 {
   struct ix86_address parts;
-  if (!ix86_decompose_address (XEXP (op, 0), &parts))
-    abort ();
+  int ok;
+
+  ok = ix86_decompose_address (XEXP (op, 0), &parts);
+  gcc_assert (ok);
   return parts.disp != NULL_RTX;
 })
 
index 0f6c7eac97c2b3a6476ea899b55655f85b49a2e6..ee2e6147a15c9bd927132d8bb585e8fdbe5f8b27 100644 (file)
@@ -75,7 +75,7 @@
       else
        return "movdqa\t{%1, %0|%0, %1}";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "sselog1,ssemov,ssemov")
       else
        return "movapd\t{%1, %0|%0, %1}";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
   [(set_attr "type" "sselog1,ssemov,ssemov")