On Thu, 21 Apr 2011, Richard Guenther wrote:

> On Wed, Apr 20, 2011 at 11:09 PM, Joseph S. Myers
> <jos...@codesourcery.com> wrote:
> > Ping^2.  This patch
> > <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00130.html> is still pending
> > review.  This version applies cleanly to current trunk.
> 
> The s/struct rtx_def */rtx/ changes are all ok (in fact I'd say they are
> obvious).

I have committed the approved parts (those, plus the cris and m32c 
changes) as r172818.  The following remains pending review (target 
maintainers CC:ed).

2011-04-21  Joseph Myers  <jos...@codesourcery.com>

        * config/bfin/bfin-protos.h (Mmode): Don't define.  Expand
        definition where used.
        * config/fr30/fr30-protos.h (Mmode): Don't define.
        * config/fr30/fr30.h (inhibit_libc): Don't define.
        * config/i386/cygming.h (union tree_node, TREE): Don't define or
        undefine.
        (FILE): Don't undefine.
        * config/m32r/m32r-protos.h (Mmode): Don't define.  Expand
        definition where used.
        * config/mn10300/mn10300-protos.h (Mmode, Cstar, Rclas): Don't
        define.  Expand definitions where used.
        * config/rx/rx-protos.h (Mmode, Fargs, Rcode): Don't define.
        Expand definitions where used.
        * config/rx/rx.c (rx_is_legitimate_address, rx_function_arg_size,
        rx_function_arg, rx_function_arg_advance,
        rx_function_arg_boundary): Expand definitions of those macros.
        * config/v850/v850-protos.h (Mmode): Don't define.  Expand
        definition where used.
        * config/v850/v850.h (GHS_default_section_names,
        GHS_current_section_names): Use tree, not union tree_node *.

Index: gcc/config/m32r/m32r-protos.h
===================================================================
--- gcc/config/m32r/m32r-protos.h       (revision 172818)
+++ gcc/config/m32r/m32r-protos.h       (working copy)
@@ -1,5 +1,6 @@
 /* Prototypes for m32r.c functions used in the md file & elsewhere.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010,
+   2011
    Free Software Foundation, Inc.
 
    This file is part of GCC.
@@ -18,9 +19,8 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-/* Function prototypes that cannot exist in v850.h due to dependency
+/* Function prototypes that cannot exist in m32r.h due to dependency
    complications.  */
-#define Mmode enum machine_mode
 
 extern void   m32r_init (void);
 extern void   m32r_init_expanders (void);
@@ -51,16 +51,14 @@ extern rtx    m32r_return_addr (int);
 extern rtx    m32r_function_symbol (const char *);
 
 #ifdef HAVE_MACHINE_MODES
-extern int    call_operand (rtx, Mmode);
-extern int    small_data_operand (rtx, Mmode);
-extern int    addr24_operand (rtx, Mmode);
-extern int    addr32_operand (rtx, Mmode);
-extern int    call26_operand (rtx, Mmode);
-extern int    memreg_operand (rtx, Mmode);
-extern int    small_insn_p (rtx, Mmode);
+extern int    call_operand (rtx, enum machine_mode);
+extern int    small_data_operand (rtx, enum machine_mode);
+extern int    addr24_operand (rtx, enum machine_mode);
+extern int    addr32_operand (rtx, enum machine_mode);
+extern int    call26_operand (rtx, enum machine_mode);
+extern int    memreg_operand (rtx, enum machine_mode);
+extern int    small_insn_p (rtx, enum machine_mode);
 
 #endif /* HAVE_MACHINE_MODES */
 
 #endif /* RTX_CODE */
-
-#undef  Mmode
Index: gcc/config/i386/cygming.h
===================================================================
--- gcc/config/i386/cygming.h   (revision 172818)
+++ gcc/config/i386/cygming.h   (working copy)
@@ -1,7 +1,7 @@
 /* Operating system specific defines to be used when targeting GCC for
    hosting on Windows32, using a Unix style C library and tools.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2007, 2008, 2009, 2010
+   2004, 2005, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -176,9 +176,6 @@ along with GCC; see the file COPYING3.
 #undef LONG_TYPE_SIZE
 #define LONG_TYPE_SIZE 32
 
-union tree_node;
-#define TREE union tree_node *
-
 #define drectve_section() \
   (fprintf (asm_out_file, "\t.section .drectve\n"), \
    in_section = NULL)
@@ -472,9 +469,3 @@ do {                                                \
 
 /* Static stack checking is supported by means of probes.  */
 #define STACK_CHECK_STATIC_BUILTIN 1
-
-#undef TREE
-
-#ifndef BUFSIZ
-# undef FILE
-#endif
Index: gcc/config/rx/rx-protos.h
===================================================================
--- gcc/config/rx/rx-protos.h   (revision 172818)
+++ gcc/config/rx/rx-protos.h   (working copy)
@@ -21,11 +21,6 @@
 #ifndef GCC_RX_PROTOS_H
 #define GCC_RX_PROTOS_H
 
-/* A few abbreviations to make the prototypes shorter.  */
-#define Mmode  enum machine_mode
-#define Fargs  CUMULATIVE_ARGS
-#define Rcode  enum rtx_code
-
 extern int             rx_align_for_label (void);
 extern void            rx_expand_prologue (void);
 extern int             rx_initial_elimination_offset (int, int);
@@ -37,11 +32,13 @@ extern void             rx_emit_stack_pu
 extern void            rx_expand_epilogue (bool);
 extern char *          rx_gen_move_template (rtx *, bool);
 extern bool            rx_legitimate_constant_p (enum machine_mode, rtx);
-extern bool            rx_is_restricted_memory_address (rtx, Mmode);
-extern bool            rx_match_ccmode (rtx, Mmode);
+extern bool            rx_is_restricted_memory_address (rtx,
+                                                        enum machine_mode);
+extern bool            rx_match_ccmode (rtx, enum machine_mode);
 extern void            rx_notice_update_cc (rtx body, rtx insn);
-extern void            rx_split_cbranch (Mmode, Rcode, rtx, rtx, rtx);
-extern Mmode           rx_select_cc_mode (Rcode, rtx, rtx);
+extern void            rx_split_cbranch (enum machine_mode, enum rtx_code,
+                                         rtx, rtx, rtx);
+extern enum machine_mode       rx_select_cc_mode (enum rtx_code, rtx, rtx);
 #endif
 
 #endif /* GCC_RX_PROTOS_H */
Index: gcc/config/rx/rx.c
===================================================================
--- gcc/config/rx/rx.c  (revision 172818)
+++ gcc/config/rx/rx.c  (working copy)
@@ -78,7 +78,8 @@ rx_small_data_operand (rtx op)
 }
 
 static bool
-rx_is_legitimate_address (Mmode mode, rtx x, bool strict ATTRIBUTE_UNUSED)
+rx_is_legitimate_address (enum machine_mode mode, rtx x,
+                         bool strict ATTRIBUTE_UNUSED)
 {
   if (RTX_OK_FOR_BASE (x, strict))
     /* Register Indirect.  */
@@ -809,7 +810,7 @@ rx_round_up (unsigned int value, unsigne
    occupied by an argument of type TYPE and mode MODE.  */
 
 static unsigned int
-rx_function_arg_size (Mmode mode, const_tree type)
+rx_function_arg_size (enum machine_mode mode, const_tree type)
 {
   unsigned int num_bytes;
 
@@ -829,7 +830,8 @@ rx_function_arg_size (Mmode mode, const_
    variable parameter list.  */
 
 static rtx
-rx_function_arg (Fargs * cum, Mmode mode, const_tree type, bool named)
+rx_function_arg (CUMULATIVE_ARGS * cum, enum machine_mode mode,
+                const_tree type, bool named)
 {
   unsigned int next_reg;
   unsigned int bytes_so_far = *cum;
@@ -866,14 +868,14 @@ rx_function_arg (Fargs * cum, Mmode mode
 }
 
 static void
-rx_function_arg_advance (Fargs * cum, Mmode mode, const_tree type,
-                        bool named ATTRIBUTE_UNUSED)
+rx_function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
+                        const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   *cum += rx_function_arg_size (mode, type);
 }
 
 static unsigned int
-rx_function_arg_boundary (Mmode mode ATTRIBUTE_UNUSED,
+rx_function_arg_boundary (enum machine_mode mode ATTRIBUTE_UNUSED,
                          const_tree type ATTRIBUTE_UNUSED)
 {
   return 32;
Index: gcc/config/fr30/fr30.h
===================================================================
--- gcc/config/fr30/fr30.h      (revision 172818)
+++ gcc/config/fr30/fr30.h      (working copy)
@@ -839,11 +839,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE
    `QImode'.  */
 #define FUNCTION_MODE QImode
 
-/* If cross-compiling, don't require stdio.h etc to build libgcc.a.  */
-#if defined CROSS_DIRECTORY_STRUCTURE && ! defined inhibit_libc
-#define inhibit_libc
-#endif
-
 /*}}}*/ 
 
 /* Local Variables: */
Index: gcc/config/fr30/fr30-protos.h
===================================================================
--- gcc/config/fr30/fr30-protos.h       (revision 172818)
+++ gcc/config/fr30/fr30-protos.h       (working copy)
@@ -1,5 +1,5 @@
 /* Prototypes for fr30.c functions used in the md file & elsewhere.
-   Copyright (C) 1999, 2000, 2002, 2004, 2007, 2010
+   Copyright (C) 1999, 2000, 2002, 2004, 2007, 2010, 2011
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -28,8 +28,6 @@ extern void  fr30_print_operand (FILE *,
 extern void  fr30_print_operand_address (FILE *, rtx);
 extern rtx   fr30_move_double (rtx *);
 #ifdef HAVE_MACHINE_MODES
-#define Mmode enum machine_mode
 extern int   fr30_const_double_is_zero (rtx);
-#undef Mmode
 #endif /* HAVE_MACHINE_MODES */
 #endif /* RTX_CODE */
Index: gcc/config/mn10300/mn10300-protos.h
===================================================================
--- gcc/config/mn10300/mn10300-protos.h (revision 172818)
+++ gcc/config/mn10300/mn10300-protos.h (working copy)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler. Matsushita MN10300 series
-   Copyright (C) 2000, 2003, 2004, 2005, 2007, 2009, 2010
+   Copyright (C) 2000, 2003, 2004, 2005, 2007, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Jeff Law (l...@cygnus.com).
 
@@ -19,28 +19,25 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-#define Mmode enum machine_mode
-#define Cstar const char *
-#define Rclas enum reg_class
-
 #ifdef RTX_CODE
 extern rtx   mn10300_legitimize_pic_address (rtx, rtx);
 extern int   mn10300_legitimate_pic_operand_p (rtx);
-extern rtx   mn10300_legitimize_reload_address (rtx, Mmode, int, int, int);
+extern rtx   mn10300_legitimize_reload_address (rtx, enum machine_mode,
+                                               int, int, int);
 extern bool  mn10300_function_value_regno_p (const unsigned int);
 extern int   mn10300_get_live_callee_saved_regs (void);
-extern bool  mn10300_hard_regno_mode_ok (unsigned int, Mmode);
-extern bool  mn10300_modes_tieable (Mmode, Mmode);
-extern Cstar mn10300_output_add (rtx[3], bool);
+extern bool  mn10300_hard_regno_mode_ok (unsigned int, enum machine_mode);
+extern bool  mn10300_modes_tieable (enum machine_mode, enum machine_mode);
+extern const char *mn10300_output_add (rtx[3], bool);
 extern void  mn10300_print_operand (FILE *, rtx, int);
 extern void  mn10300_print_operand_address (FILE *, rtx);
 extern void  mn10300_print_reg_list (FILE *, int);
-extern Mmode mn10300_select_cc_mode (enum rtx_code, rtx, rtx);
-extern int   mn10300_store_multiple_operation (rtx, Mmode);
-extern int   mn10300_symbolic_operand (rtx, Mmode);
-extern void  mn10300_split_cbranch (Mmode, rtx, rtx);
+extern enum machine_mode mn10300_select_cc_mode (enum rtx_code, rtx, rtx);
+extern int   mn10300_store_multiple_operation (rtx, enum machine_mode);
+extern int   mn10300_symbolic_operand (rtx, enum machine_mode);
+extern void  mn10300_split_cbranch (enum machine_mode, rtx, rtx);
 extern int   mn10300_split_and_operand_count (rtx);
-extern bool  mn10300_match_ccmode (rtx, Mmode);
+extern bool  mn10300_match_ccmode (rtx, enum machine_mode);
 #endif /* RTX_CODE */
 
 extern bool  mn10300_regno_in_class_p (unsigned, int, bool);
@@ -50,7 +47,3 @@ extern void  mn10300_expand_prologue (vo
 extern void  mn10300_expand_epilogue (void);
 extern int   mn10300_initial_offset (int, int);
 extern int   mn10300_frame_size (void);
-
-#undef Mmode
-#undef Cstar
-#undef Rclas
Index: gcc/config/v850/v850.h
===================================================================
--- gcc/config/v850/v850.h      (revision 172818)
+++ gcc/config/v850/v850.h      (working copy)
@@ -906,8 +906,8 @@ typedef struct data_area_stack_element
 extern data_area_stack_element * data_area_stack;
 
 /* Names of the various data areas used on the v850.  */
-extern union tree_node * GHS_default_section_names [(int) 
COUNT_OF_GHS_SECTION_KINDS];
-extern union tree_node * GHS_current_section_names [(int) 
COUNT_OF_GHS_SECTION_KINDS];
+extern tree GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
+extern tree GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
 
 /* The assembler op to start the file.  */
 
Index: gcc/config/v850/v850-protos.h
===================================================================
--- gcc/config/v850/v850-protos.h       (revision 172818)
+++ gcc/config/v850/v850-protos.h       (working copy)
@@ -23,8 +23,6 @@
 #ifndef GCC_V850_PROTOS_H
 #define GCC_V850_PROTOS_H
 
-#define Mmode enum machine_mode
-
 extern void   expand_prologue               (void);
 extern void   expand_epilogue               (void);
 extern int    v850_handle_pragma            (int (*)(void), void (*)(int), 
char *);
@@ -41,12 +39,14 @@ extern char * construct_restore_jr
 #ifdef HAVE_MACHINE_MODES
 extern char * construct_dispose_instruction (rtx);
 extern char * construct_prepare_instruction (rtx);
-extern int    ep_memory_operand             (rtx, Mmode, int);
-extern int    v850_float_z_comparison_operator (rtx, Mmode);
-extern int    v850_float_nz_comparison_operator (rtx, Mmode);
-extern rtx    v850_gen_compare              (enum rtx_code, Mmode, rtx, rtx);
-extern Mmode  v850_gen_float_compare (enum rtx_code, Mmode, rtx, rtx);
-extern Mmode  v850_select_cc_mode (RTX_CODE, rtx, rtx);
+extern int    ep_memory_operand             (rtx, enum machine_mode, int);
+extern int    v850_float_z_comparison_operator (rtx, enum machine_mode);
+extern int    v850_float_nz_comparison_operator (rtx, enum machine_mode);
+extern rtx    v850_gen_compare              (enum rtx_code, enum machine_mode,
+                                            rtx, rtx);
+extern enum machine_mode  v850_gen_float_compare (enum rtx_code,
+                                                 enum machine_mode, rtx, rtx);
+extern enum machine_mode  v850_select_cc_mode (RTX_CODE, rtx, rtx);
 #endif
 #endif /* RTX_CODE */
 
@@ -67,6 +67,4 @@ extern void ghs_pragma_endtda             (stru
 extern void ghs_pragma_endsda              (struct cpp_reader *);
 extern void ghs_pragma_endzda              (struct cpp_reader *);
 
-#undef  Mmode
-
 #endif /* ! GCC_V850_PROTOS_H */
Index: gcc/config/bfin/bfin-protos.h
===================================================================
--- gcc/config/bfin/bfin-protos.h       (revision 172818)
+++ gcc/config/bfin/bfin-protos.h       (working copy)
@@ -1,5 +1,6 @@
 /* Prototypes for Blackfin functions used in the md file & elsewhere.
-   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is part of GNU CC.
 
@@ -63,8 +64,6 @@
 #define ENABLE_WA_05000074 \
   (bfin_workarounds & WA_05000074)
 
-#define Mmode enum machine_mode
-
 extern bool function_arg_regno_p (int);
 
 extern const char *output_load_immediate (rtx *);
@@ -73,14 +72,14 @@ extern char *bfin_asm_long (void);
 extern char *bfin_asm_short (void);
 extern int log2constp (unsigned HOST_WIDE_INT);
 
-extern int hard_regno_mode_ok (int, Mmode);
+extern int hard_regno_mode_ok (int, enum machine_mode);
 extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);         
 extern HOST_WIDE_INT bfin_initial_elimination_offset (int, int);
 
-extern int effective_address_32bit_p (rtx, Mmode);
+extern int effective_address_32bit_p (rtx, enum machine_mode);
 extern int symbolic_reference_mentioned_p (rtx);
-extern rtx bfin_gen_compare (rtx, Mmode);
-extern bool expand_move (rtx *, Mmode);
+extern rtx bfin_gen_compare (rtx, enum machine_mode);
+extern bool expand_move (rtx *, enum machine_mode);
 extern void bfin_expand_call (rtx, rtx, rtx, rtx, int);
 extern bool bfin_longcall_p (rtx, int);
 extern bool bfin_dsp_memref_p (rtx);
@@ -89,9 +88,11 @@ extern bool bfin_expand_movmem (rtx, rtx
 extern int bfin_register_move_cost (enum machine_mode, enum reg_class,
                                    enum reg_class);
 extern int bfin_memory_move_cost (enum machine_mode, enum reg_class, int in);
-extern enum reg_class secondary_input_reload_class (enum reg_class, Mmode,
+extern enum reg_class secondary_input_reload_class (enum reg_class,
+                                                   enum machine_mode,
                                                    rtx);
-extern enum reg_class secondary_output_reload_class (enum reg_class, Mmode,
+extern enum reg_class secondary_output_reload_class (enum reg_class,
+                                                    enum machine_mode,
                                                     rtx);
 extern char *section_asm_op_1 (SECT_ENUM_T);
 extern char *section_asm_op (SECT_ENUM_T);
@@ -99,23 +100,22 @@ extern void print_operand (FILE *,  rtx,
 extern void print_address_operand (FILE *, rtx);
 extern void split_di (rtx [], int, rtx [], rtx []);
 extern int split_load_immediate (rtx []);
-extern void emit_pic_move (rtx *, Mmode);
+extern void emit_pic_move (rtx *, enum machine_mode);
 extern void asm_conditional_branch (rtx, rtx *, int, int);
-extern rtx bfin_gen_compare (rtx, Mmode);
+extern rtx bfin_gen_compare (rtx, enum machine_mode);
 
 extern unsigned bfin_local_alignment (tree, unsigned);
 extern rtx bfin_va_arg (tree, tree);
 
 extern void bfin_expand_prologue (void);
 extern void bfin_expand_epilogue (int, int, bool);
-extern int push_multiple_operation (rtx, Mmode);
-extern int pop_multiple_operation (rtx, Mmode);
+extern int push_multiple_operation (rtx, enum machine_mode);
+extern int pop_multiple_operation (rtx, enum machine_mode);
 extern void output_push_multiple (rtx, rtx *);
 extern void output_pop_multiple (rtx, rtx *);
 extern int bfin_hard_regno_rename_ok (unsigned int, unsigned int);
 extern rtx bfin_return_addr_rtx (int);
 extern void bfin_hardware_loop (void);
-#undef  Mmode 
 
 #endif
 

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to