]> gcc.gnu.org Git - gcc.git/commitdiff
dsp16xx.h (FIRST_PSEUDO_REGISTER): Add parentheses to definition.
authorJohn Carr <jfc@gcc.gnu.org>
Sat, 27 Jun 1998 17:47:15 +0000 (17:47 +0000)
committerJohn Carr <jfc@gcc.gnu.org>
Sat, 27 Jun 1998 17:47:15 +0000 (17:47 +0000)
* dsp16xx.h (FIRST_PSEUDO_REGISTER): Add parentheses to definition.
* dsp16xx.c (next_cc_user_unsigned): New function.
Remove save_next_cc_user_code.
(print_operand): Use HOST_WIDE_INT_PRINT_* macros.
* dsp16xx.md: Call next_cc_user_unsigned instead of using
  save_next_cc_user_code.
Use gen_rtx_* functions instead of gen_rtx.
* rs6000.c: Add trap_comparison_operator to PREDICATE_CODES.

From-SVN: r20757

gcc/ChangeLog
gcc/config/dsp16xx/dsp16xx.c
gcc/config/dsp16xx/dsp16xx.h
gcc/config/dsp16xx/dsp16xx.md
gcc/config/rs6000/rs6000.h

index d3cb6c1fdf1dfa38f1d0d8203bd792ab38b12963..5da61d29f0ec71dfbd76fb1b218d1cc9fb3bbfdd 100644 (file)
@@ -1,3 +1,17 @@
+Sat Jun 27 20:20:00 1998  John Carr  <jfc@mit.edu>
+
+       * dsp16xx.h (FIRST_PSEUDO_REGISTER): Add parentheses to definition.
+       * dsp16xx.c (next_cc_user_unsigned): New function.
+       Remove save_next_cc_user_code.
+       (print_operand): Use HOST_WIDE_INT_PRINT_* macros.
+       * dsp16xx.md: Call next_cc_user_unsigned instead of using
+       save_next_cc_user_code.
+       Use gen_rtx_* functions instead of gen_rtx.
+
+Sat Jun 27 20:18:34 1998  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
+
+       * rs6000.c: Add trap_comparison_operator to PREDICATE_CODES.
+
 Sat Jun 27 16:45:42 1998  Jeffrey A Law  (law@cygnus.com)
 
        * flow.c (count_reg_sets): New function.
index dc9763ee32d1c4ac97f99daade4e265a8ac995be..e7bcdced235a16e1617e608d409b5a594cec2ebe 100644 (file)
@@ -1531,8 +1531,6 @@ override_options ()
     }
 }
 
-enum rtx_code save_next_cc_user_code;
-
 enum rtx_code
 next_cc_user_code (insn)
 rtx insn;
@@ -1551,6 +1549,22 @@ rtx insn;
     abort ();
 }
 
+int
+next_cc_user_unsigned (insn)
+     rtx insn;
+{
+  switch (next_cc_user_code (insn))
+    {
+    case GTU:
+    case GEU:
+    case LTU:
+    case LEU:
+      return 1;
+    default:
+      return 0;
+    }
+}
+
 void
 print_operand(file, op, letter)
 FILE *file;
@@ -1624,12 +1638,13 @@ int letter;
         output_address( XEXP(op,0) );
     else if( code == CONST_INT )
     { 
+       HOST_WIDE_INT val = INTVAL (op);
         if( letter == 'H' )
-            fprintf( file, "0x%x", (INTVAL(op) & 0xffff) );
+            fprintf( file, HOST_WIDE_INT_PRINT_HEX, val & 0xffff);
        else if (letter == 'h')
-            fprintf( file, "%d", INTVAL (op) );
+            fprintf( file, HOST_WIDE_INT_PRINT_DEC, val);
         else if( letter == 'U' )
-            fprintf( file, "0x%x", ((INTVAL(op) & 0xffff0000) >> 16) & 0xffff );
+            fprintf( file, HOST_WIDE_INT_PRINT_HEX, (val >> 16) & 0xffff);
         else
            output_addr_const( file, op );
     }
index ee4b140ba2f5e28fe5265bb0e5ac790db16ddb0b..785e8ca983b7d2f66112eda7521fe8f3cf5d2f7f 100644 (file)
@@ -76,7 +76,7 @@ extern void bss_section ();
 extern struct rtx_def *dsp16xx_function_arg ();
 extern void dsp16xx_function_arg_advance ();
 extern enum rtx_code next_cc_user_code ();
-extern enum rtx_code save_next_cc_user_code;
+extern int next_cc_user_unsigned ();
 extern struct rtx_def *gen_tst_reg ();
 extern char *output_block_move();
 
@@ -436,7 +436,7 @@ extern int target_flags;
    The hardware registers are assigned numbers for the compiler
    from 0 to FIRST_PSEUDO_REGISTER-1 */
 
-#define FIRST_PSEUDO_REGISTER REG_YBASE31 + 1
+#define FIRST_PSEUDO_REGISTER (REG_YBASE31 + 1)
 
 /* 1 for registers that have pervasive standard uses
    and are not available for the register allocator.
@@ -1131,11 +1131,11 @@ extern struct dsp16xx_frame_info current_frame_info;
 #define VALUE_REGNO(MODE)  (REG_Y)
 
 #define FUNCTION_VALUE(VALTYPE, FUNC)  \
-  gen_rtx (REG, TYPE_MODE (VALTYPE), VALUE_REGNO(TYPE_MODE(VALTYPE)))
+  gen_rtx_REG (TYPE_MODE (VALTYPE), VALUE_REGNO(TYPE_MODE(VALTYPE)))
 
 /* Define how to find the value returned by a library function
    assuming the value has mode MODE.  */
-#define LIBCALL_VALUE(MODE)  gen_rtx (REG, MODE, VALUE_REGNO(MODE))
+#define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, VALUE_REGNO(MODE))
 
 /* 1 if N is a possible register number for a function value. */
 #define FUNCTION_VALUE_REGNO_P(N) ((N) == REG_Y)
index 4e8f31dfe6a451b66b36f6fbda76af41c56820bf..9923178d90ce5c1a8a60bdc83ef7889ce7aa1246 100644 (file)
@@ -1,5 +1,5 @@
 ;;- Machine description for the AT&T DSP1600 for GNU C compiler
-;;  Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+;;  Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
 ;;  Contributed by Michael Collison (collison@world.std.com).
 
 ;; This file is part of GNU CC.
   if (GET_CODE (operands[1]) == CONST_INT)
     operands[1] = force_reg (HImode, operands[1]);
 
-  if (operands[0])     /* Avoid unused code warning */
-    {
-      dsp16xx_compare_gen = gen_compare_reg;
-      dsp16xx_compare_op0 = operands[0];
-      dsp16xx_compare_op1 = operands[1];
-      DONE;
-    }
-
+  dsp16xx_compare_gen = gen_compare_reg;
+  dsp16xx_compare_op0 = operands[0];
+  dsp16xx_compare_op1 = operands[1];
+  DONE;
 }")
 
 (define_insn ""
    (clobber (match_scratch:QI 3 "=&A"))
    (clobber (match_scratch:QI 4 "=&A"))
    (clobber (match_scratch:QI 5 "=&A"))]
-  "(save_next_cc_user_code = next_cc_user_code (insn)) == GTU \
-   || save_next_cc_user_code == GEU \
-   || save_next_cc_user_code == LTU \
-   || save_next_cc_user_code == LEU"
+  "next_cc_user_unsigned (insn)"
   "*
 {
   if (GET_CODE(operands[0]) == REG)
     {
       rtx xoperands[2];
 
-      xoperands[0] = gen_rtx (REG, HImode, REG_A0);
+      xoperands[0] = gen_rtx_REG (HImode, REG_A0);
       xoperands[1] = operands[0];
       double_reg_from_memory (xoperands);
     }
     {
       rtx xoperands[2];
 
-      xoperands[0] = gen_rtx (REG, HImode, REG_A1);
+      xoperands[0] = gen_rtx_REG (HImode, REG_A1);
       xoperands[1] = operands[1];
       double_reg_from_memory (xoperands);
     }
                        (match_operand:QI 1 "nonmemory_operand" "w,z,u,i,w,z,k,i")))
        (clobber (match_scratch:QI 2 "=j,j,j,j,q,q,q,q"))
        (clobber (match_scratch:QI 3 "=v,y,q,X,v,y,j,X"))]
-  "(save_next_cc_user_code = next_cc_user_code (insn)) == GTU \
-   || save_next_cc_user_code == GEU \
-   || save_next_cc_user_code == LTU \
-   || save_next_cc_user_code == LEU"
+  "next_cc_user_unsigned (insn)"
   "@
    %2=0\;%3=0\;%2-%3
    %2=0\;%3=0\;%2-%3
   "
 {
   if (!dsp16xx_cmphf3_libcall)
-    dsp16xx_cmphf3_libcall = gen_rtx (SYMBOL_REF, Pmode, CMPHF3_LIBCALL);
+    dsp16xx_cmphf3_libcall = gen_rtx_SYMBOL_REF (Pmode, CMPHF3_LIBCALL);
 
    dsp16xx_compare_gen = gen_compare_reg;
    dsp16xx_compare_op0 = operands[0];
   "
 {
   if (!dsp16xx_addhf3_libcall)
-    dsp16xx_addhf3_libcall = gen_rtx (SYMBOL_REF, Pmode, ADDHF3_LIBCALL);
+    dsp16xx_addhf3_libcall = gen_rtx_SYMBOL_REF (Pmode, ADDHF3_LIBCALL);
 
    emit_library_call (dsp16xx_addhf3_libcall, 1, HFmode, 2,
                      operands[1], HFmode,
   "
 {
   if (!dsp16xx_subhf3_libcall)
-    dsp16xx_subhf3_libcall = gen_rtx (SYMBOL_REF, Pmode, SUBHF3_LIBCALL);
+    dsp16xx_subhf3_libcall = gen_rtx_SYMBOL_REF (Pmode, SUBHF3_LIBCALL);
   
   emit_library_call (dsp16xx_subhf3_libcall, 1, HFmode, 2,
                     operands[1], HFmode,
 "
 {
   if (!dsp16xx_neghf2_libcall)
-    dsp16xx_neghf2_libcall = gen_rtx (SYMBOL_REF, Pmode, NEGHF2_LIBCALL);
+    dsp16xx_neghf2_libcall = gen_rtx_SYMBOL_REF (Pmode, NEGHF2_LIBCALL);
   
   emit_library_call (dsp16xx_neghf2_libcall, 1, HFmode, 1,
                     operands[1], HFmode);
   "
 {
   if (!dsp16xx_mulhi3_libcall)
-    dsp16xx_mulhi3_libcall = gen_rtx (SYMBOL_REF, Pmode, MULHI3_LIBCALL);
+    dsp16xx_mulhi3_libcall = gen_rtx_SYMBOL_REF (Pmode, MULHI3_LIBCALL);
 
    emit_library_call (dsp16xx_mulhi3_libcall, 1, HImode, 2,
                      operands[1], HImode,
   "
 {
   if (!dsp16xx_mulhf3_libcall)
-    dsp16xx_mulhf3_libcall = gen_rtx (SYMBOL_REF, Pmode, MULHF3_LIBCALL);
+    dsp16xx_mulhf3_libcall = gen_rtx_SYMBOL_REF (Pmode, MULHF3_LIBCALL);
   
   emit_library_call (dsp16xx_mulhf3_libcall, 1, HFmode, 2,
                     operands[1], HFmode,
   "
 {
   if (!dsp16xx_divhi3_libcall)
-    dsp16xx_divhi3_libcall = gen_rtx (SYMBOL_REF, Pmode, DIVHI3_LIBCALL);
+    dsp16xx_divhi3_libcall = gen_rtx_SYMBOL_REF (Pmode, DIVHI3_LIBCALL);
 
    emit_library_call (dsp16xx_divhi3_libcall, 1, HImode, 2,
                      operands[1], HImode,
   "
 {
   if (!dsp16xx_udivhi3_libcall)
-    dsp16xx_udivhi3_libcall = gen_rtx (SYMBOL_REF, Pmode, UDIVHI3_LIBCALL);
+    dsp16xx_udivhi3_libcall = gen_rtx_SYMBOL_REF (Pmode, UDIVHI3_LIBCALL);
   
   emit_library_call (dsp16xx_udivhi3_libcall, 1, HImode, 2,
                     operands[1], HImode,
   "
 {
   if (!dsp16xx_divqi3_libcall)
-    dsp16xx_divqi3_libcall = gen_rtx (SYMBOL_REF, Pmode, DIVQI3_LIBCALL);
+    dsp16xx_divqi3_libcall = gen_rtx_SYMBOL_REF (Pmode, DIVQI3_LIBCALL);
   
   emit_library_call (dsp16xx_divqi3_libcall, 1, QImode, 2,
                     operands[1], QImode,
   "
 {
   if (!dsp16xx_udivqi3_libcall)
-    dsp16xx_udivqi3_libcall = gen_rtx (SYMBOL_REF, Pmode, UDIVQI3_LIBCALL);
+    dsp16xx_udivqi3_libcall = gen_rtx_SYMBOL_REF (Pmode, UDIVQI3_LIBCALL);
 
    emit_library_call (dsp16xx_udivqi3_libcall, 1, QImode, 2,
                      operands[1], QImode,
   "
 {
   if (!dsp16xx_modhi3_libcall)
-    dsp16xx_modhi3_libcall = gen_rtx (SYMBOL_REF, Pmode, MODHI3_LIBCALL);
+    dsp16xx_modhi3_libcall = gen_rtx_SYMBOL_REF (Pmode, MODHI3_LIBCALL);
   
   emit_library_call (dsp16xx_modhi3_libcall, 1, HImode, 2,
                     operands[1], HImode,
   "
 {
   if (!dsp16xx_umodhi3_libcall)
-    dsp16xx_umodhi3_libcall = gen_rtx (SYMBOL_REF, Pmode, UMODHI3_LIBCALL);
+    dsp16xx_umodhi3_libcall = gen_rtx_SYMBOL_REF (Pmode, UMODHI3_LIBCALL);
   
   emit_library_call (dsp16xx_umodhi3_libcall, 1, HImode, 2,
                     operands[1], HImode,
   "
 {
   if (!dsp16xx_modqi3_libcall)
-    dsp16xx_modqi3_libcall = gen_rtx (SYMBOL_REF, Pmode, MODQI3_LIBCALL);
+    dsp16xx_modqi3_libcall = gen_rtx_SYMBOL_REF (Pmode, MODQI3_LIBCALL);
   
   emit_library_call (dsp16xx_modqi3_libcall, 1, QImode, 2,
                     operands[1], QImode,
   "
 {
   if (!dsp16xx_umodqi3_libcall)
-    dsp16xx_umodqi3_libcall = gen_rtx (SYMBOL_REF, Pmode, UMODQI3_LIBCALL);
+    dsp16xx_umodqi3_libcall = gen_rtx_SYMBOL_REF (Pmode, UMODQI3_LIBCALL);
   
   emit_library_call (dsp16xx_umodqi3_libcall, 1, QImode, 2,
                     operands[1], QImode,
   "
 {
   if (!dsp16xx_divhf3_libcall)
-    dsp16xx_divhf3_libcall = gen_rtx (SYMBOL_REF, Pmode, DIVHF3_LIBCALL);
+    dsp16xx_divhf3_libcall = gen_rtx_SYMBOL_REF (Pmode, DIVHF3_LIBCALL);
   
   emit_library_call (dsp16xx_divhf3_libcall, 1, HFmode, 2,
                     operands[1], HFmode,
   operands[5] = addr0;
   operands[6] = addr1;
 
-  operands[0] = gen_rtx (MEM, BLKmode, addr0);
-  operands[1] = gen_rtx (MEM, BLKmode, addr1);
+  operands[0] = change_address (operands[0], VOIDmode, addr0);
+  operands[1] = change_address (operands[1], VOIDmode, addr1);
 }")
 
 (define_insn ""
   "
 {
   if (!dsp16xx_floathihf2_libcall)
-    dsp16xx_floathihf2_libcall = gen_rtx (SYMBOL_REF, Pmode, FLOATHIHF2_LIBCALL);
+    dsp16xx_floathihf2_libcall = gen_rtx_SYMBOL_REF (Pmode, FLOATHIHF2_LIBCALL);
   
   emit_library_call (dsp16xx_floathihf2_libcall, 1, HFmode, 1,
                     operands[1], HImode);
   "
 {
   if (!dsp16xx_fixhfhi2_libcall)
-    dsp16xx_fixhfhi2_libcall = gen_rtx (SYMBOL_REF, Pmode, FIXHFHI2_LIBCALL);
+    dsp16xx_fixhfhi2_libcall = gen_rtx_SYMBOL_REF (Pmode, FIXHFHI2_LIBCALL);
   
   emit_library_call (dsp16xx_fixhfhi2_libcall, 1, HImode, 1,
                     operands[1], HFmode);
 
 #if 0
        if (!dsp16xx_ashrhi3_libcall)
-         dsp16xx_ashrhi3_libcall = gen_rtx (SYMBOL_REF, Pmode, ASHRHI3_LIBCALL);
+         dsp16xx_ashrhi3_libcall = gen_rtx_SYMBOL_REF (Pmode, ASHRHI3_LIBCALL);
 
          emit_library_call (dsp16xx_ashrhi3_libcall, 1, HImode, 2,
                             operands[1], HImode,
          rtx label2 = gen_label_rtx ();
 #if 0
          if (!dsp16xx_lshrhi3_libcall)
-           dsp16xx_lshrhi3_libcall = gen_rtx (SYMBOL_REF, Pmode, LSHRHI3_LIBCALL);
+           dsp16xx_lshrhi3_libcall = gen_rtx_SYMBOL_REF (Pmode, LSHRHI3_LIBCALL);
          
          emit_library_call (dsp16xx_lshrhi3_libcall, 1, HImode, 2,
                             operands[1], HImode,
        rtx label2 = gen_label_rtx ();
 #if 0
        if (!dsp16xx_ashlhi3_libcall)
-         dsp16xx_ashlhi3_libcall = gen_rtx (SYMBOL_REF, Pmode, ASHLHI3_LIBCALL);
+         dsp16xx_ashlhi3_libcall = gen_rtx_SYMBOL_REF (Pmode, ASHLHI3_LIBCALL);
 
          emit_library_call (dsp16xx_ashlhi3_libcall, 1, HImode, 2,
                             operands[1], HImode,
index 4559d9ca3ea8add408133acf3f4190f06c1ef9a6..329bc1aee260f18b1625e6e688c552cb61247ece 100644 (file)
@@ -3131,7 +3131,9 @@ do {                                                                      \
   {"branch_comparison_operator", {EQ, NE, LE, LT, GE,          \
                                  GT, LEU, LTU, GEU, GTU}},     \
   {"scc_comparison_operator", {EQ, NE, LE, LT, GE,             \
-                              GT, LEU, LTU, GEU, GTU}},
+                              GT, LEU, LTU, GEU, GTU}},        \
+  {"trap_comparison_operator", {EQ, NE, LE, LT, GE,            \
+                               GT, LEU, LTU, GEU, GTU}},
 
 
 /* uncomment for disabling the corresponding default options */
@@ -3205,6 +3207,7 @@ extern int load_multiple_operation ();
 extern int store_multiple_operation ();
 extern int branch_comparison_operator ();
 extern int scc_comparison_operator ();
+extern int trap_comparison_operator ();
 extern int includes_lshift_p ();
 extern int includes_rshift_p ();
 extern int registers_ok_for_quad_peep ();
@@ -3242,7 +3245,6 @@ extern struct rtx_def *rs6000_longcall_ref ();
 extern int function_arg_padding ();
 extern void toc_section ();
 extern void private_data_section ();
-extern int trap_comparison_operator ();
 
 /* See nonlocal_goto_receiver for when this must be set.  */
 
This page took 0.0999679999999999 seconds and 5 git commands to generate.