public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Target header etc. cleanup patch
@ 2011-04-02 17:06 Joseph S. Myers
  2011-04-02 17:16 ` Paul Koning
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Joseph S. Myers @ 2011-04-02 17:06 UTC (permalink / raw)
  To: gcc-patches

In the course of trying to work out exactly what target macros there
are, I came across various oddities in target headers (and a few in
target .c files) that are fixed by this patch.

* Various targets use "struct rtx_def *" or "union tree_node *" in
  place of "rtx" or "tree".  I think this must predate coretypes.h,
  which ensures the typedefs are always available (and should always
  be included before tm.h or tm_p.h).

* Some targets went the other way and defined their own macros for
  various standard types.  Some of those macros weren't even used.  I
  don't think it makes sense for individual targets to define macros
  for use in their prototypes like that, so I removed those
  definitions (expanding the uses).

* cris-protos.h had an unused STDIO_INCLUDED definition, which I
  removed.  i386/cygming.h had a #undef of FILE, which doesn't make
  any sense (no code in GCC should be defining such a macro itself) so
  I removed that as well.

* fr30.h defined inhibit_libc.  This is normally defined by configure
  when appropriate (based on the configure options) and it doesn't
  make any sense for a single architecture to define it in its own
  headers instead so I removed it.

* Testing showed that IRA_COVER_CLASSES had not been removed from
  pdp11.h when it was removed from other targets, so I removed it in
  this patch so that the other pdp11.h change could be tested.

Tested building cc1 and xgcc for crosses to: alpha-linux-gnu bfin-elf
cris-elf fr30-elf h8300-elf i686-cygwin iq2000-elf m32c-elf m32r-elf
microblaze-elf mn10300-elf hppa-linux-gnu pdp11-none rx-elf sh-elf
spu-elf v850-elf.  OK to commit?

2011-04-02  Joseph Myers  <joseph:codesourcery.com>

	* config/alpha/alpha.c (struct machine_function): Use rtx, not
	struct rtx_def *.
	* config/bfin/bfin-protos.h (Mmode): Don't define.  Expand
	definition where used.
	* config/bfin/bfin.h (bfin_cc_rtx, bfin_rets_rtx): Use rtx, not
	struct rtx_def *.
	* config/cris/cris-protos.h (STDIO_INCLUDED): Don't define.
	* config/fr30/fr30-protos.h (Mmode): Don't define.
	* config/fr30/fr30.h (inhibit_libc): Don't define.
	* config/h8300/h8300.h (struct cum_arg): Use rtx, not struct
	rtx_def *.
	* config/i386/cygming.h (union tree_node, TREE): Don't define or
	undefine.
	(FILE): Don't undefine.
	* config/iq2000/iq2000.h (struct iq2000_args): Use rtx, not struct
	rtx_def *.
	* config/m32c/m32c-protos.h (MM, UINT): Don't define.  Expand
	definitions where used.
	* config/m32r/m32r-protos.h (Mmode): Don't define.  Expand
	definition where used.
	* config/microblaze/microblaze.h (struct microblaze_args): Use
	rtx, not struct rtx_def *.
	* config/mn10300/mn10300-protos.h (Mmode, Cstar, Rclas): Don't
	define.  Expand definitions where used.
	* config/pa/pa-protos.h (return_addr_rtx): Use rtx, not struct
	rtx_def *.
	* config/pa/pa.h (hppa_pic_save_rtx): Use rtx, not struct rtx_def
	*.
	* config/pdp11/pdp11.h (IRA_COVER_CLASSES): Remove.
	(cc0_reg_rtx): Use rtx, not struct rtx_def *.
	* 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/sh/sh-protos.h (sfunc_uses_reg, get_fpscr_rtx): Use rtx,
	not struct rtx_def *.
	* config/sh/sh.h (sh_compare_op0, sh_compare_op1): Use rtx, not
	struct rtx_def *.
	* config/spu/spu-protos.h (spu_float_const): Use rtx, not struct
	rtx_def *.
	* config/spu/spu.c (spu_float_const): Use rtx, not struct rtx_def
	*.
	* 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/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	(revision 171804)
+++ gcc/config/alpha/alpha.c	(working copy)
@@ -4606,7 +4606,7 @@ struct GTY(()) machine_function
   const char *some_ld_name;
 
   /* For TARGET_LD_BUGGY_LDGP.  */
-  struct rtx_def *gp_save_rtx;
+  rtx gp_save_rtx;
 
   /* For VMS condition handlers.  */
   bool uses_condition_handler;  
Index: gcc/config/m32c/m32c-protos.h
===================================================================
--- gcc/config/m32c/m32c-protos.h	(revision 171804)
+++ gcc/config/m32c/m32c-protos.h	(working copy)
@@ -1,5 +1,5 @@
 /* Target Prototypes for R8C/M16C/M32C
-   Copyright (C) 2005, 2007, 2008, 2010
+   Copyright (C) 2005, 2007, 2008, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Red Hat.
 
@@ -19,12 +19,9 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-#define MM enum machine_mode
-#define UINT unsigned int
-
 void m32c_conditional_register_usage (void);
 int  m32c_const_ok_for_constraint_p (HOST_WIDE_INT, char, const char *);
-UINT m32c_dwarf_frame_regnum (int);
+unsigned int m32c_dwarf_frame_regnum (int);
 int  m32c_eh_return_data_regno (int);
 void m32c_emit_epilogue (void);
 void m32c_emit_prologue (void);
@@ -47,8 +44,8 @@ int  m32c_trampoline_size (void);
 
 #ifdef RTX_CODE
 
-int  m32c_cannot_change_mode_class (MM, MM, int);
-int  m32c_class_max_nregs (int, MM);
+int  m32c_cannot_change_mode_class (enum machine_mode, enum machine_mode, int);
+int  m32c_class_max_nregs (int, enum machine_mode);
 rtx  m32c_eh_return_stackadj_rtx (void);
 void m32c_emit_eh_epilogue (rtx);
 int  m32c_expand_cmpstr (rtx *);
@@ -60,20 +57,20 @@ void m32c_expand_neg_mulpsi3 (rtx *);
 int  m32c_expand_setmemhi (rtx *);
 int  m32c_extra_constraint_p (rtx, char, const char *);
 int  m32c_extra_constraint_p2 (rtx, char, const char *);
-int  m32c_hard_regno_nregs (int, MM);
-int  m32c_hard_regno_ok (int, MM);
+int  m32c_hard_regno_nregs (int, enum machine_mode);
+int  m32c_hard_regno_ok (int, enum machine_mode);
 bool m32c_illegal_subreg_p (rtx);
-bool m32c_immd_dbl_mov (rtx *, MM);
+bool m32c_immd_dbl_mov (rtx *, enum machine_mode);
 rtx  m32c_incoming_return_addr_rtx (void);
 int  m32c_legitimate_constant_p (rtx);
-int  m32c_legitimize_reload_address (rtx *, MM, int, int, int);
-int  m32c_limit_reload_class (MM, int);
-int  m32c_modes_tieable_p (MM, MM);
-bool m32c_mov_ok (rtx *, MM);
+int  m32c_legitimize_reload_address (rtx *, enum machine_mode, int, int, int);
+int  m32c_limit_reload_class (enum machine_mode, int);
+int  m32c_modes_tieable_p (enum machine_mode, enum machine_mode);
+bool m32c_mov_ok (rtx *, enum machine_mode);
 char * m32c_output_compare (rtx, rtx *);
 int  m32c_preferred_output_reload_class (rtx, int);
 int  m32c_preferred_reload_class (rtx, int);
-int  m32c_prepare_move (rtx *, MM);
+int  m32c_prepare_move (rtx *, enum machine_mode);
 int  m32c_prepare_shift (rtx *, int, int);
 void m32c_print_operand (FILE *, rtx, int);
 void m32c_print_operand_address (FILE *, rtx);
@@ -81,8 +78,8 @@ int  m32c_reg_ok_for_base_p (rtx, int);
 enum reg_class m32c_regno_reg_class (int);
 rtx  m32c_return_addr_rtx (int);
 const char *m32c_scc_pattern (rtx *, RTX_CODE);
-int  m32c_secondary_reload_class (int, MM, rtx);
-int  m32c_split_move (rtx *, MM, int);
+int  m32c_secondary_reload_class (int, enum machine_mode, rtx);
+int  m32c_split_move (rtx *, enum machine_mode, int);
 int  m32c_split_psi_p (rtx *);
 int current_function_special_page_vector (rtx);
 
@@ -98,6 +95,3 @@ void m32c_output_aligned_common (FILE *,
 				 int, int, int);
 
 #endif
-
-#undef MM
-#undef UINT
Index: gcc/config/spu/spu-protos.h
===================================================================
--- gcc/config/spu/spu-protos.h	(revision 171804)
+++ gcc/config/spu/spu-protos.h	(working copy)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007, 2008, 2009, 2010
+/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is free software; you can redistribute it and/or modify it under
@@ -42,8 +42,8 @@ extern rtx hwint_to_const_double (enum m
 extern rtx spu_const (enum machine_mode mode, HOST_WIDE_INT val);
 extern rtx spu_const_from_ints (enum machine_mode mode, 
 			        int a, int b, int c, int d);
-extern struct rtx_def *spu_float_const (const char *string,
-					enum machine_mode mode);
+extern rtx spu_float_const (const char *string,
+			    enum machine_mode mode);
 extern int immediate_load_p (rtx op, enum machine_mode mode);
 extern int logical_immediate_p (rtx op, enum machine_mode mode);
 extern int iohl_immediate_p (rtx op, enum machine_mode mode);
Index: gcc/config/spu/spu.c
===================================================================
--- gcc/config/spu/spu.c	(revision 171804)
+++ gcc/config/spu/spu.c	(working copy)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is free software; you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free
@@ -3309,7 +3310,7 @@ spu_sched_adjust_cost (rtx insn, rtx lin
 }
 \f
 /* Create a CONST_DOUBLE from a string.  */
-struct rtx_def *
+rtx
 spu_float_const (const char *string, enum machine_mode mode)
 {
   REAL_VALUE_TYPE value;
Index: gcc/config/m32r/m32r-protos.h
===================================================================
--- gcc/config/m32r/m32r-protos.h	(revision 171804)
+++ 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 171804)
+++ 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
 \f
-union tree_node;
-#define TREE union tree_node *
-\f
 #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 171804)
+++ 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
-\f
 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_is_legitimate_constant (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 171804)
+++ gcc/config/rx/rx.c	(working copy)
@@ -80,7 +80,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.  */
@@ -811,7 +812,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;
 
@@ -831,7 +832,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;
@@ -868,14 +870,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/sh/sh-protos.h
===================================================================
--- gcc/config/sh/sh-protos.h	(revision 171804)
+++ gcc/config/sh/sh-protos.h	(working copy)
@@ -51,7 +51,7 @@ extern const char *output_movedouble (rt
 extern const char *output_movepcrel (rtx, rtx[], enum machine_mode);
 extern const char *output_far_jump (rtx, rtx);
 
-extern struct rtx_def *sfunc_uses_reg (rtx);
+extern rtx sfunc_uses_reg (rtx);
 extern int barrier_align (rtx);
 extern int sh_loop_align (rtx);
 extern int fp_zero_operand (rtx);
@@ -126,7 +126,7 @@ extern bool sh_vector_mode_supported_p (
 
 extern const char *output_jump_label_table (void);
 extern int sh_handle_pragma (int (*)(void), void (*)(int), const char *);
-extern struct rtx_def *get_fpscr_rtx (void);
+extern rtx get_fpscr_rtx (void);
 extern int sh_media_register_for_return (void);
 extern void sh_expand_prologue (void);
 extern void sh_expand_epilogue (bool);
Index: gcc/config/sh/sh.h
===================================================================
--- gcc/config/sh/sh.h	(revision 171804)
+++ gcc/config/sh/sh.h	(working copy)
@@ -2321,8 +2321,8 @@ struct sh_args {
   final_prescan_insn ((INSN), (OPVEC), (NOPERANDS))
 
 \f
-extern struct rtx_def *sh_compare_op0;
-extern struct rtx_def *sh_compare_op1;
+extern rtx sh_compare_op0;
+extern rtx sh_compare_op1;
 
 /* Which processor to schedule for.  The elements of the enumeration must
    match exactly the cpu attribute in the sh.md file.  */
Index: gcc/config/pdp11/pdp11.h
===================================================================
--- gcc/config/pdp11/pdp11.h	(revision 171804)
+++ gcc/config/pdp11/pdp11.h	(working copy)
@@ -271,16 +271,6 @@ enum reg_class { NO_REGS, MUL_REGS, GENE
 #define INDEX_REG_CLASS GENERAL_REGS
 #define BASE_REG_CLASS GENERAL_REGS
 
-/* The following macro defines cover classes for Integrated Register
-   Allocator.  Cover classes is a set of non-intersected register
-   classes covering all hard registers used for register allocation
-   purpose.  Any move between two registers of a cover class should be
-   cheaper than load or store of the registers.  The macro value is
-   array of register classes with LIM_REG_CLASSES used as the end
-   marker.  */
-
-#define IRA_COVER_CLASSES { GENERAL_REGS, FPU_REGS, LIM_REG_CLASSES }
-
 /* Hook for testing if memory is needed for moving between registers.  */
 #define SECONDARY_MEMORY_NEEDED(class1, class2, m) \
   pdp11_secondary_memory_needed (class1, class2, m)
@@ -518,7 +508,7 @@ extern int may_call_alloca;
 
 \f
 /* Tell emit-rtl.c how to initialize special values on a per-function base.  */
-extern struct rtx_def *cc0_reg_rtx;
+extern rtx cc0_reg_rtx;
 
 #define CC_STATUS_MDEP rtx
 
Index: gcc/config/microblaze/microblaze.h
===================================================================
--- gcc/config/microblaze/microblaze.h	(revision 171804)
+++ gcc/config/microblaze/microblaze.h	(working copy)
@@ -473,7 +473,7 @@ typedef struct microblaze_args
   /* Adjustments made to args pass in regs.  */
   /* ??? The size is doubled to work around a bug in the code that sets the 
      adjustments in function_arg.  */
-  struct rtx_def *adjust[MAX_ARGS_IN_REGISTERS * 2];
+  rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
 } CUMULATIVE_ARGS;
 
 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS)	\
Index: gcc/config/fr30/fr30.h
===================================================================
--- gcc/config/fr30/fr30.h	(revision 171804)
+++ gcc/config/fr30/fr30.h	(working copy)
@@ -852,11 +852,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
-
 /*}}}*/ \f
 
 /* Local Variables: */
Index: gcc/config/fr30/fr30-protos.h
===================================================================
--- gcc/config/fr30/fr30-protos.h	(revision 171804)
+++ 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/cris/cris-protos.h
===================================================================
--- gcc/config/cris/cris-protos.h	(revision 171804)
+++ gcc/config/cris/cris-protos.h	(working copy)
@@ -1,5 +1,6 @@
 /* Definitions for GCC.  Part of the machine description for CRIS.
-   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010
+   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010,
+   2011
    Free Software Foundation, Inc.
    Contributed by Axis Communications.
 
@@ -21,10 +22,6 @@ along with GCC; see the file COPYING3.  
 
 /* Prototypes for the CRIS port.  */
 
-#if defined(FILE) || defined(stdin) || defined(stdout) || defined(getc) || defined(putc)
-#define STDIO_INCLUDED
-#endif
-
 extern bool cris_simple_epilogue (void);
 #ifdef RTX_CODE
 extern const char *cris_op_str (rtx);
Index: gcc/config/iq2000/iq2000.h
===================================================================
--- gcc/config/iq2000/iq2000.h	(revision 171804)
+++ gcc/config/iq2000/iq2000.h	(working copy)
@@ -314,7 +314,7 @@ typedef struct iq2000_args
   int fp_code;			/* Mode of FP arguments.  */
   unsigned int num_adjusts;	/* Number of adjustments made.  */
 				/* Adjustments made to args pass in regs.  */
-  struct rtx_def * adjust[MAX_ARGS_IN_REGISTERS * 2];
+  rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
 } CUMULATIVE_ARGS;
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
Index: gcc/config/mn10300/mn10300-protos.h
===================================================================
--- gcc/config/mn10300/mn10300-protos.h	(revision 171804)
+++ 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 (law@cygnus.com).
 
@@ -19,29 +19,26 @@
    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_hard_regno_mode_ok (unsigned int, enum machine_mode);
 extern bool  mn10300_legitimate_constant_p (rtx);
-extern bool  mn10300_modes_tieable (Mmode, Mmode);
-extern Cstar mn10300_output_add (rtx[3], bool);
+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);
@@ -51,7 +48,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/pa/pa-protos.h
===================================================================
--- gcc/config/pa/pa-protos.h	(revision 171804)
+++ gcc/config/pa/pa-protos.h	(working copy)
@@ -1,5 +1,5 @@
 /* Prototypes for pa.c functions used in the md file & elsewhere.
-   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
+   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011
    Free Software Foundation,
    Inc.
 
@@ -109,7 +109,7 @@ extern int attr_length_save_restore_dltp
 
 /* Declare functions defined in pa.c and used in templates.  */
 
-extern struct rtx_def *return_addr_rtx (int, rtx);
+extern rtx return_addr_rtx (int, rtx);
 
 extern int fp_reg_operand (rtx, enum machine_mode);
 extern int arith_double_operand (rtx, enum machine_mode);
Index: gcc/config/pa/pa.h
===================================================================
--- gcc/config/pa/pa.h	(revision 171804)
+++ gcc/config/pa/pa.h	(working copy)
@@ -351,7 +351,7 @@ typedef struct GTY(()) machine_function
 
 /* Function to return the rtx used to save the pic offset table register
    across function calls.  */
-extern struct rtx_def *hppa_pic_save_rtx (void);
+extern rtx hppa_pic_save_rtx (void);
 
 #define DEFAULT_PCC_STRUCT_RETURN 0
 
Index: gcc/config/v850/v850.h
===================================================================
--- gcc/config/v850/v850.h	(revision 171804)
+++ gcc/config/v850/v850.h	(working copy)
@@ -917,8 +917,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 171804)
+++ 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/h8300/h8300.h
===================================================================
--- gcc/config/h8300/h8300.h	(revision 171804)
+++ gcc/config/h8300/h8300.h	(working copy)
@@ -540,7 +540,7 @@ enum reg_class {
 struct cum_arg
 {
   int nbytes;
-  struct rtx_def *libcall;
+  rtx libcall;
 };
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
Index: gcc/config/bfin/bfin-protos.h
===================================================================
--- gcc/config/bfin/bfin-protos.h	(revision 171804)
+++ 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 *);
@@ -74,14 +73,14 @@ extern char *bfin_asm_short (void);
 extern int log2constp (unsigned HOST_WIDE_INT);
 
 extern bool bfin_legitimate_constant_p (rtx);
-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);
@@ -90,9 +89,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);
@@ -100,23 +101,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
 
Index: gcc/config/bfin/bfin.h
===================================================================
--- gcc/config/bfin/bfin.h	(revision 171804)
+++ gcc/config/bfin/bfin.h	(working copy)
@@ -1144,7 +1144,7 @@ do { 						\
 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) fprintf (FILE, "[SP--] = %s;\n", reg_names[REGNO])
 #define ASM_OUTPUT_REG_POP(FILE, REGNO)  fprintf (FILE, "%s = [SP++];\n", reg_names[REGNO])
 
-extern struct rtx_def *bfin_cc_rtx, *bfin_rets_rtx;
+extern rtx bfin_cc_rtx, bfin_rets_rtx;
 
 /* This works for GAS and some other assemblers.  */
 #define SET_ASM_OP              ".set "

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Target header etc. cleanup patch
  2011-04-02 17:06 Target header etc. cleanup patch Joseph S. Myers
@ 2011-04-02 17:16 ` Paul Koning
  2011-04-04 10:33 ` Joseph S. Myers
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: Paul Koning @ 2011-04-02 17:16 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches


On Apr 2, 2011, at 1:05 PM, Joseph S. Myers wrote:

> In the course of trying to work out exactly what target macros there
> are, I came across various oddities in target headers (and a few in
> target .c files) that are fixed by this patch....
> 
> * Testing showed that IRA_COVER_CLASSES had not been removed from
>  pdp11.h when it was removed from other targets, so I removed it in
>  this patch so that the other pdp11.h change could be tested.
...

I did not realize that IRA_COVER_CLASSES had gone away.  What replaces it?  It wasn't that long ago that I put it in because it seemed that up to date targets were supposed to have this (and the internals manual implied as much).

PDP11 looks good, thanks.

	paul

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Target header etc. cleanup patch
  2011-04-02 17:06 Target header etc. cleanup patch Joseph S. Myers
  2011-04-02 17:16 ` Paul Koning
@ 2011-04-04 10:33 ` Joseph S. Myers
  2011-04-08 18:46 ` Ping " Joseph S. Myers
  2011-04-12  1:08 ` Hans-Peter Nilsson
  3 siblings, 0 replies; 24+ messages in thread
From: Joseph S. Myers @ 2011-04-04 10:33 UTC (permalink / raw)
  To: gcc-patches

Here's a version of the patch updated for current trunk, since the pdp11 
IRA_COVER_CLASSES removal has now been committed separately.  OK to 
commit?

2011-04-04  Joseph Myers  <joseph:codesourcery.com>

	* config/alpha/alpha.c (struct machine_function): Use rtx, not
	struct rtx_def *.
	* config/bfin/bfin-protos.h (Mmode): Don't define.  Expand
	definition where used.
	* config/bfin/bfin.h (bfin_cc_rtx, bfin_rets_rtx): Use rtx, not
	struct rtx_def *.
	* config/cris/cris-protos.h (STDIO_INCLUDED): Don't define.
	* config/fr30/fr30-protos.h (Mmode): Don't define.
	* config/fr30/fr30.h (inhibit_libc): Don't define.
	* config/h8300/h8300.h (struct cum_arg): Use rtx, not struct
	rtx_def *.
	* config/i386/cygming.h (union tree_node, TREE): Don't define or
	undefine.
	(FILE): Don't undefine.
	* config/iq2000/iq2000.h (struct iq2000_args): Use rtx, not struct
	rtx_def *.
	* config/m32c/m32c-protos.h (MM, UINT): Don't define.  Expand
	definitions where used.
	* config/m32r/m32r-protos.h (Mmode): Don't define.  Expand
	definition where used.
	* config/microblaze/microblaze.h (struct microblaze_args): Use
	rtx, not struct rtx_def *.
	* config/mn10300/mn10300-protos.h (Mmode, Cstar, Rclas): Don't
	define.  Expand definitions where used.
	* config/pa/pa-protos.h (return_addr_rtx): Use rtx, not struct
	rtx_def *.
	* config/pa/pa.h (hppa_pic_save_rtx): Use rtx, not struct rtx_def
	*.
	* config/pdp11/pdp11.h (cc0_reg_rtx): Use rtx, not struct rtx_def
	*.
	* 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/sh/sh-protos.h (sfunc_uses_reg, get_fpscr_rtx): Use rtx,
	not struct rtx_def *.
	* config/sh/sh.h (sh_compare_op0, sh_compare_op1): Use rtx, not
	struct rtx_def *.
	* config/spu/spu-protos.h (spu_float_const): Use rtx, not struct
	rtx_def *.
	* config/spu/spu.c (spu_float_const): Use rtx, not struct rtx_def
	*.
	* 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/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	(revision 171932)
+++ gcc/config/alpha/alpha.c	(working copy)
@@ -4606,7 +4606,7 @@ struct GTY(()) machine_function
   const char *some_ld_name;
 
   /* For TARGET_LD_BUGGY_LDGP.  */
-  struct rtx_def *gp_save_rtx;
+  rtx gp_save_rtx;
 
   /* For VMS condition handlers.  */
   bool uses_condition_handler;  
Index: gcc/config/m32c/m32c-protos.h
===================================================================
--- gcc/config/m32c/m32c-protos.h	(revision 171932)
+++ gcc/config/m32c/m32c-protos.h	(working copy)
@@ -1,5 +1,5 @@
 /* Target Prototypes for R8C/M16C/M32C
-   Copyright (C) 2005, 2007, 2008, 2010
+   Copyright (C) 2005, 2007, 2008, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Red Hat.
 
@@ -19,12 +19,9 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-#define MM enum machine_mode
-#define UINT unsigned int
-
 void m32c_conditional_register_usage (void);
 int  m32c_const_ok_for_constraint_p (HOST_WIDE_INT, char, const char *);
-UINT m32c_dwarf_frame_regnum (int);
+unsigned int m32c_dwarf_frame_regnum (int);
 int  m32c_eh_return_data_regno (int);
 void m32c_emit_epilogue (void);
 void m32c_emit_prologue (void);
@@ -47,8 +44,8 @@ int  m32c_trampoline_size (void);
 
 #ifdef RTX_CODE
 
-int  m32c_cannot_change_mode_class (MM, MM, int);
-int  m32c_class_max_nregs (int, MM);
+int  m32c_cannot_change_mode_class (enum machine_mode, enum machine_mode, int);
+int  m32c_class_max_nregs (int, enum machine_mode);
 rtx  m32c_eh_return_stackadj_rtx (void);
 void m32c_emit_eh_epilogue (rtx);
 int  m32c_expand_cmpstr (rtx *);
@@ -60,20 +57,20 @@ void m32c_expand_neg_mulpsi3 (rtx *);
 int  m32c_expand_setmemhi (rtx *);
 int  m32c_extra_constraint_p (rtx, char, const char *);
 int  m32c_extra_constraint_p2 (rtx, char, const char *);
-int  m32c_hard_regno_nregs (int, MM);
-int  m32c_hard_regno_ok (int, MM);
+int  m32c_hard_regno_nregs (int, enum machine_mode);
+int  m32c_hard_regno_ok (int, enum machine_mode);
 bool m32c_illegal_subreg_p (rtx);
-bool m32c_immd_dbl_mov (rtx *, MM);
+bool m32c_immd_dbl_mov (rtx *, enum machine_mode);
 rtx  m32c_incoming_return_addr_rtx (void);
 int  m32c_legitimate_constant_p (rtx);
-int  m32c_legitimize_reload_address (rtx *, MM, int, int, int);
-int  m32c_limit_reload_class (MM, int);
-int  m32c_modes_tieable_p (MM, MM);
-bool m32c_mov_ok (rtx *, MM);
+int  m32c_legitimize_reload_address (rtx *, enum machine_mode, int, int, int);
+int  m32c_limit_reload_class (enum machine_mode, int);
+int  m32c_modes_tieable_p (enum machine_mode, enum machine_mode);
+bool m32c_mov_ok (rtx *, enum machine_mode);
 char * m32c_output_compare (rtx, rtx *);
 int  m32c_preferred_output_reload_class (rtx, int);
 int  m32c_preferred_reload_class (rtx, int);
-int  m32c_prepare_move (rtx *, MM);
+int  m32c_prepare_move (rtx *, enum machine_mode);
 int  m32c_prepare_shift (rtx *, int, int);
 void m32c_print_operand (FILE *, rtx, int);
 void m32c_print_operand_address (FILE *, rtx);
@@ -81,8 +78,8 @@ int  m32c_reg_ok_for_base_p (rtx, int);
 enum reg_class m32c_regno_reg_class (int);
 rtx  m32c_return_addr_rtx (int);
 const char *m32c_scc_pattern (rtx *, RTX_CODE);
-int  m32c_secondary_reload_class (int, MM, rtx);
-int  m32c_split_move (rtx *, MM, int);
+int  m32c_secondary_reload_class (int, enum machine_mode, rtx);
+int  m32c_split_move (rtx *, enum machine_mode, int);
 int  m32c_split_psi_p (rtx *);
 int current_function_special_page_vector (rtx);
 
@@ -98,6 +95,3 @@ void m32c_output_aligned_common (FILE *,
 				 int, int, int);
 
 #endif
-
-#undef MM
-#undef UINT
Index: gcc/config/spu/spu-protos.h
===================================================================
--- gcc/config/spu/spu-protos.h	(revision 171932)
+++ gcc/config/spu/spu-protos.h	(working copy)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007, 2008, 2009, 2010
+/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is free software; you can redistribute it and/or modify it under
@@ -42,8 +42,8 @@ extern rtx hwint_to_const_double (enum m
 extern rtx spu_const (enum machine_mode mode, HOST_WIDE_INT val);
 extern rtx spu_const_from_ints (enum machine_mode mode, 
 			        int a, int b, int c, int d);
-extern struct rtx_def *spu_float_const (const char *string,
-					enum machine_mode mode);
+extern rtx spu_float_const (const char *string,
+			    enum machine_mode mode);
 extern int immediate_load_p (rtx op, enum machine_mode mode);
 extern int logical_immediate_p (rtx op, enum machine_mode mode);
 extern int iohl_immediate_p (rtx op, enum machine_mode mode);
Index: gcc/config/spu/spu.c
===================================================================
--- gcc/config/spu/spu.c	(revision 171932)
+++ gcc/config/spu/spu.c	(working copy)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is free software; you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free
@@ -3309,7 +3310,7 @@ spu_sched_adjust_cost (rtx insn, rtx lin
 }
 \f
 /* Create a CONST_DOUBLE from a string.  */
-struct rtx_def *
+rtx
 spu_float_const (const char *string, enum machine_mode mode)
 {
   REAL_VALUE_TYPE value;
Index: gcc/config/m32r/m32r-protos.h
===================================================================
--- gcc/config/m32r/m32r-protos.h	(revision 171932)
+++ 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 171932)
+++ 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
 \f
-union tree_node;
-#define TREE union tree_node *
-\f
 #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 171932)
+++ 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
-\f
 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_is_legitimate_constant (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 171932)
+++ gcc/config/rx/rx.c	(working copy)
@@ -80,7 +80,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.  */
@@ -811,7 +812,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;
 
@@ -831,7 +832,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;
@@ -868,14 +870,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/sh/sh-protos.h
===================================================================
--- gcc/config/sh/sh-protos.h	(revision 171932)
+++ gcc/config/sh/sh-protos.h	(working copy)
@@ -51,7 +51,7 @@ extern const char *output_movedouble (rt
 extern const char *output_movepcrel (rtx, rtx[], enum machine_mode);
 extern const char *output_far_jump (rtx, rtx);
 
-extern struct rtx_def *sfunc_uses_reg (rtx);
+extern rtx sfunc_uses_reg (rtx);
 extern int barrier_align (rtx);
 extern int sh_loop_align (rtx);
 extern int fp_zero_operand (rtx);
@@ -126,7 +126,7 @@ extern bool sh_vector_mode_supported_p (
 
 extern const char *output_jump_label_table (void);
 extern int sh_handle_pragma (int (*)(void), void (*)(int), const char *);
-extern struct rtx_def *get_fpscr_rtx (void);
+extern rtx get_fpscr_rtx (void);
 extern int sh_media_register_for_return (void);
 extern void sh_expand_prologue (void);
 extern void sh_expand_epilogue (bool);
Index: gcc/config/sh/sh.h
===================================================================
--- gcc/config/sh/sh.h	(revision 171932)
+++ gcc/config/sh/sh.h	(working copy)
@@ -2321,8 +2321,8 @@ struct sh_args {
   final_prescan_insn ((INSN), (OPVEC), (NOPERANDS))
 
 \f
-extern struct rtx_def *sh_compare_op0;
-extern struct rtx_def *sh_compare_op1;
+extern rtx sh_compare_op0;
+extern rtx sh_compare_op1;
 
 /* Which processor to schedule for.  The elements of the enumeration must
    match exactly the cpu attribute in the sh.md file.  */
Index: gcc/config/pdp11/pdp11.h
===================================================================
--- gcc/config/pdp11/pdp11.h	(revision 171932)
+++ gcc/config/pdp11/pdp11.h	(working copy)
@@ -508,7 +508,7 @@ extern int may_call_alloca;
 
 \f
 /* Tell emit-rtl.c how to initialize special values on a per-function base.  */
-extern struct rtx_def *cc0_reg_rtx;
+extern rtx cc0_reg_rtx;
 
 #define CC_STATUS_MDEP rtx
 
Index: gcc/config/microblaze/microblaze.h
===================================================================
--- gcc/config/microblaze/microblaze.h	(revision 171932)
+++ gcc/config/microblaze/microblaze.h	(working copy)
@@ -473,7 +473,7 @@ typedef struct microblaze_args
   /* Adjustments made to args pass in regs.  */
   /* ??? The size is doubled to work around a bug in the code that sets the 
      adjustments in function_arg.  */
-  struct rtx_def *adjust[MAX_ARGS_IN_REGISTERS * 2];
+  rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
 } CUMULATIVE_ARGS;
 
 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS)	\
Index: gcc/config/fr30/fr30.h
===================================================================
--- gcc/config/fr30/fr30.h	(revision 171932)
+++ gcc/config/fr30/fr30.h	(working copy)
@@ -852,11 +852,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
-
 /*}}}*/ \f
 
 /* Local Variables: */
Index: gcc/config/fr30/fr30-protos.h
===================================================================
--- gcc/config/fr30/fr30-protos.h	(revision 171932)
+++ 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/cris/cris-protos.h
===================================================================
--- gcc/config/cris/cris-protos.h	(revision 171932)
+++ gcc/config/cris/cris-protos.h	(working copy)
@@ -1,5 +1,6 @@
 /* Definitions for GCC.  Part of the machine description for CRIS.
-   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010
+   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010,
+   2011
    Free Software Foundation, Inc.
    Contributed by Axis Communications.
 
@@ -21,10 +22,6 @@ along with GCC; see the file COPYING3.
 
 /* Prototypes for the CRIS port.  */
 
-#if defined(FILE) || defined(stdin) || defined(stdout) || defined(getc) || defined(putc)
-#define STDIO_INCLUDED
-#endif
-
 extern bool cris_simple_epilogue (void);
 #ifdef RTX_CODE
 extern const char *cris_op_str (rtx);
Index: gcc/config/iq2000/iq2000.h
===================================================================
--- gcc/config/iq2000/iq2000.h	(revision 171932)
+++ gcc/config/iq2000/iq2000.h	(working copy)
@@ -314,7 +314,7 @@ typedef struct iq2000_args
   int fp_code;			/* Mode of FP arguments.  */
   unsigned int num_adjusts;	/* Number of adjustments made.  */
 				/* Adjustments made to args pass in regs.  */
-  struct rtx_def * adjust[MAX_ARGS_IN_REGISTERS * 2];
+  rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
 } CUMULATIVE_ARGS;
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
Index: gcc/config/mn10300/mn10300-protos.h
===================================================================
--- gcc/config/mn10300/mn10300-protos.h	(revision 171932)
+++ 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 (law@cygnus.com).
 
@@ -19,29 +19,26 @@
    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_hard_regno_mode_ok (unsigned int, enum machine_mode);
 extern bool  mn10300_legitimate_constant_p (rtx);
-extern bool  mn10300_modes_tieable (Mmode, Mmode);
-extern Cstar mn10300_output_add (rtx[3], bool);
+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);
@@ -51,7 +48,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/pa/pa-protos.h
===================================================================
--- gcc/config/pa/pa-protos.h	(revision 171932)
+++ gcc/config/pa/pa-protos.h	(working copy)
@@ -1,5 +1,5 @@
 /* Prototypes for pa.c functions used in the md file & elsewhere.
-   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
+   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011
    Free Software Foundation,
    Inc.
 
@@ -109,7 +109,7 @@ extern int attr_length_save_restore_dltp
 
 /* Declare functions defined in pa.c and used in templates.  */
 
-extern struct rtx_def *return_addr_rtx (int, rtx);
+extern rtx return_addr_rtx (int, rtx);
 
 extern int fp_reg_operand (rtx, enum machine_mode);
 extern int arith_double_operand (rtx, enum machine_mode);
Index: gcc/config/pa/pa.h
===================================================================
--- gcc/config/pa/pa.h	(revision 171932)
+++ gcc/config/pa/pa.h	(working copy)
@@ -351,7 +351,7 @@ typedef struct GTY(()) machine_function
 
 /* Function to return the rtx used to save the pic offset table register
    across function calls.  */
-extern struct rtx_def *hppa_pic_save_rtx (void);
+extern rtx hppa_pic_save_rtx (void);
 
 #define DEFAULT_PCC_STRUCT_RETURN 0
 
Index: gcc/config/h8300/h8300.h
===================================================================
--- gcc/config/h8300/h8300.h	(revision 171932)
+++ gcc/config/h8300/h8300.h	(working copy)
@@ -463,7 +463,7 @@ enum reg_class {
 struct cum_arg
 {
   int nbytes;
-  struct rtx_def *libcall;
+  rtx libcall;
 };
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
Index: gcc/config/v850/v850.h
===================================================================
--- gcc/config/v850/v850.h	(revision 171932)
+++ gcc/config/v850/v850.h	(working copy)
@@ -917,8 +917,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 171932)
+++ 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 171932)
+++ 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 *);
@@ -74,14 +73,14 @@ extern char *bfin_asm_short (void);
 extern int log2constp (unsigned HOST_WIDE_INT);
 
 extern bool bfin_legitimate_constant_p (rtx);
-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);
@@ -90,9 +89,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);
@@ -100,23 +101,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
 
Index: gcc/config/bfin/bfin.h
===================================================================
--- gcc/config/bfin/bfin.h	(revision 171932)
+++ gcc/config/bfin/bfin.h	(working copy)
@@ -1144,7 +1144,7 @@ do { 						\
 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) fprintf (FILE, "[SP--] = %s;\n", reg_names[REGNO])
 #define ASM_OUTPUT_REG_POP(FILE, REGNO)  fprintf (FILE, "%s = [SP++];\n", reg_names[REGNO])
 
-extern struct rtx_def *bfin_cc_rtx, *bfin_rets_rtx;
+extern rtx bfin_cc_rtx, bfin_rets_rtx;
 
 /* This works for GAS and some other assemblers.  */
 #define SET_ASM_OP              ".set "

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Ping Re: Target header etc. cleanup patch
  2011-04-02 17:06 Target header etc. cleanup patch Joseph S. Myers
  2011-04-02 17:16 ` Paul Koning
  2011-04-04 10:33 ` Joseph S. Myers
@ 2011-04-08 18:46 ` Joseph S. Myers
  2011-04-08 19:14   ` Mike Stump
  2011-04-20 21:26   ` Ping^2 " Joseph S. Myers
  2011-04-12  1:08 ` Hans-Peter Nilsson
  3 siblings, 2 replies; 24+ messages in thread
From: Joseph S. Myers @ 2011-04-08 18:46 UTC (permalink / raw)
  To: gcc-patches

Ping.  This patch 
<http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00130.html> is pending 
review.  The updated version 
<http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00199.html> (with one bit 
that had been committed separately removed) applies cleanly to current 
trunk.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping Re: Target header etc. cleanup patch
  2011-04-08 18:46 ` Ping " Joseph S. Myers
@ 2011-04-08 19:14   ` Mike Stump
  2011-04-20 21:26   ` Ping^2 " Joseph S. Myers
  1 sibling, 0 replies; 24+ messages in thread
From: Mike Stump @ 2011-04-08 19:14 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Apr 8, 2011, at 11:46 AM, Joseph S. Myers wrote:
> Ping.  This patch 
> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00130.html> is pending 

> 011-04-02  Joseph Myers  <joseph:codesourcery.com>

This is wrong, it should use @ instead of :.  :-)  I glanced at the rest (in part to see if there were any darwin bits for me to approve), and didn't see anything bad.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Target header etc. cleanup patch
  2011-04-02 17:06 Target header etc. cleanup patch Joseph S. Myers
                   ` (2 preceding siblings ...)
  2011-04-08 18:46 ` Ping " Joseph S. Myers
@ 2011-04-12  1:08 ` Hans-Peter Nilsson
  2011-04-12 12:08   ` Joseph S. Myers
  3 siblings, 1 reply; 24+ messages in thread
From: Hans-Peter Nilsson @ 2011-04-12  1:08 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Sat, 2 Apr 2011, Joseph S. Myers wrote:
> * cris-protos.h had an unused STDIO_INCLUDED definition, which I
>   removed.

Been there since the first commit, it seems.
Certainly this bit is ok.

A nit: you had several lines consisting of "<TAB>*." (with the
obvious expansion) in the changelogs you posted.

brgds, H-P

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Target header etc. cleanup patch
  2011-04-12  1:08 ` Hans-Peter Nilsson
@ 2011-04-12 12:08   ` Joseph S. Myers
  2011-04-12 12:14     ` Andreas Schwab
  0 siblings, 1 reply; 24+ messages in thread
From: Joseph S. Myers @ 2011-04-12 12:08 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gcc-patches

On Mon, 11 Apr 2011, Hans-Peter Nilsson wrote:

> A nit: you had several lines consisting of "<TAB>*." (with the
> obvious expansion) in the changelogs you posted.

Yes, that's the result of line wrapping of "struct rtx_def *" at end of 
sentence.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Target header etc. cleanup patch
  2011-04-12 12:08   ` Joseph S. Myers
@ 2011-04-12 12:14     ` Andreas Schwab
  0 siblings, 0 replies; 24+ messages in thread
From: Andreas Schwab @ 2011-04-12 12:14 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: Hans-Peter Nilsson, gcc-patches

"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Mon, 11 Apr 2011, Hans-Peter Nilsson wrote:
>
>> A nit: you had several lines consisting of "<TAB>*." (with the
>> obvious expansion) in the changelogs you posted.
>
> Yes, that's the result of line wrapping of "struct rtx_def *" at end of 
> sentence.

You can write "pointer to struct rtx_def" instead.

Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Ping^2 Re: Target header etc. cleanup patch
  2011-04-08 18:46 ` Ping " Joseph S. Myers
  2011-04-08 19:14   ` Mike Stump
@ 2011-04-20 21:26   ` Joseph S. Myers
  2011-04-20 22:05     ` DJ Delorie
                       ` (3 more replies)
  1 sibling, 4 replies; 24+ messages in thread
From: Joseph S. Myers @ 2011-04-20 21:26 UTC (permalink / raw)
  To: gcc-patches

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.

2011-04-20  Joseph Myers  <joseph@codesourcery.com>

	* config/alpha/alpha.c (struct machine_function): Use rtx, not
	struct rtx_def *.
	* config/bfin/bfin-protos.h (Mmode): Don't define.  Expand
	definition where used.
	* config/bfin/bfin.h (bfin_cc_rtx, bfin_rets_rtx): Use rtx, not
	struct rtx_def *.
	* config/cris/cris-protos.h (STDIO_INCLUDED): Don't define.
	* config/fr30/fr30-protos.h (Mmode): Don't define.
	* config/fr30/fr30.h (inhibit_libc): Don't define.
	* config/h8300/h8300.h (struct cum_arg): Use rtx, not struct
	rtx_def *.
	* config/i386/cygming.h (union tree_node, TREE): Don't define or
	undefine.
	(FILE): Don't undefine.
	* config/iq2000/iq2000.h (struct iq2000_args): Use rtx, not struct
	rtx_def *.
	* config/m32c/m32c-protos.h (MM, UINT): Don't define.  Expand
	definitions where used.
	* config/m32r/m32r-protos.h (Mmode): Don't define.  Expand
	definition where used.
	* config/microblaze/microblaze.h (struct microblaze_args): Use
	rtx, not struct rtx_def *.
	* config/mn10300/mn10300-protos.h (Mmode, Cstar, Rclas): Don't
	define.  Expand definitions where used.
	* config/pa/pa-protos.h (return_addr_rtx): Use rtx, not struct
	rtx_def *.
	* config/pa/pa.h (hppa_pic_save_rtx): Use rtx, not struct rtx_def
	*.
	* config/pdp11/pdp11.h (cc0_reg_rtx): Use rtx, not struct rtx_def
	*.
	* 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/sh/sh-protos.h (sfunc_uses_reg, get_fpscr_rtx): Use rtx,
	not struct rtx_def *.
	* config/sh/sh.h (sh_compare_op0, sh_compare_op1): Use rtx, not
	struct rtx_def *.
	* config/spu/spu-protos.h (spu_float_const): Use rtx, not struct
	rtx_def *.
	* config/spu/spu.c (spu_float_const): Use rtx, not struct rtx_def
	*.
	* 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/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	(revision 172767)
+++ gcc/config/alpha/alpha.c	(working copy)
@@ -4606,7 +4606,7 @@ struct GTY(()) machine_function
   const char *some_ld_name;
 
   /* For TARGET_LD_BUGGY_LDGP.  */
-  struct rtx_def *gp_save_rtx;
+  rtx gp_save_rtx;
 
   /* For VMS condition handlers.  */
   bool uses_condition_handler;  
Index: gcc/config/m32c/m32c-protos.h
===================================================================
--- gcc/config/m32c/m32c-protos.h	(revision 172767)
+++ gcc/config/m32c/m32c-protos.h	(working copy)
@@ -1,5 +1,5 @@
 /* Target Prototypes for R8C/M16C/M32C
-   Copyright (C) 2005, 2007, 2008, 2010
+   Copyright (C) 2005, 2007, 2008, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Red Hat.
 
@@ -19,12 +19,9 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-#define MM enum machine_mode
-#define UINT unsigned int
-
 void m32c_conditional_register_usage (void);
 int  m32c_const_ok_for_constraint_p (HOST_WIDE_INT, char, const char *);
-UINT m32c_dwarf_frame_regnum (int);
+unsigned int m32c_dwarf_frame_regnum (int);
 int  m32c_eh_return_data_regno (int);
 void m32c_emit_epilogue (void);
 void m32c_emit_prologue (void);
@@ -47,8 +44,8 @@ int  m32c_trampoline_size (void);
 
 #ifdef RTX_CODE
 
-int  m32c_cannot_change_mode_class (MM, MM, int);
-int  m32c_class_max_nregs (int, MM);
+int  m32c_cannot_change_mode_class (enum machine_mode, enum machine_mode, int);
+int  m32c_class_max_nregs (int, enum machine_mode);
 rtx  m32c_eh_return_stackadj_rtx (void);
 void m32c_emit_eh_epilogue (rtx);
 int  m32c_expand_cmpstr (rtx *);
@@ -60,20 +57,20 @@ void m32c_expand_neg_mulpsi3 (rtx *);
 int  m32c_expand_setmemhi (rtx *);
 int  m32c_extra_constraint_p (rtx, char, const char *);
 int  m32c_extra_constraint_p2 (rtx, char, const char *);
-int  m32c_hard_regno_nregs (int, MM);
-int  m32c_hard_regno_ok (int, MM);
+int  m32c_hard_regno_nregs (int, enum machine_mode);
+int  m32c_hard_regno_ok (int, enum machine_mode);
 bool m32c_illegal_subreg_p (rtx);
-bool m32c_immd_dbl_mov (rtx *, MM);
+bool m32c_immd_dbl_mov (rtx *, enum machine_mode);
 rtx  m32c_incoming_return_addr_rtx (void);
 int  m32c_legitimate_constant_p (rtx);
-int  m32c_legitimize_reload_address (rtx *, MM, int, int, int);
-int  m32c_limit_reload_class (MM, int);
-int  m32c_modes_tieable_p (MM, MM);
-bool m32c_mov_ok (rtx *, MM);
+int  m32c_legitimize_reload_address (rtx *, enum machine_mode, int, int, int);
+int  m32c_limit_reload_class (enum machine_mode, int);
+int  m32c_modes_tieable_p (enum machine_mode, enum machine_mode);
+bool m32c_mov_ok (rtx *, enum machine_mode);
 char * m32c_output_compare (rtx, rtx *);
 int  m32c_preferred_output_reload_class (rtx, int);
 int  m32c_preferred_reload_class (rtx, int);
-int  m32c_prepare_move (rtx *, MM);
+int  m32c_prepare_move (rtx *, enum machine_mode);
 int  m32c_prepare_shift (rtx *, int, int);
 void m32c_print_operand (FILE *, rtx, int);
 void m32c_print_operand_address (FILE *, rtx);
@@ -81,8 +78,8 @@ int  m32c_reg_ok_for_base_p (rtx, int);
 enum reg_class m32c_regno_reg_class (int);
 rtx  m32c_return_addr_rtx (int);
 const char *m32c_scc_pattern (rtx *, RTX_CODE);
-int  m32c_secondary_reload_class (int, MM, rtx);
-int  m32c_split_move (rtx *, MM, int);
+int  m32c_secondary_reload_class (int, enum machine_mode, rtx);
+int  m32c_split_move (rtx *, enum machine_mode, int);
 int  m32c_split_psi_p (rtx *);
 int current_function_special_page_vector (rtx);
 
@@ -98,6 +95,3 @@ void m32c_output_aligned_common (FILE *,
 				 int, int, int);
 
 #endif
-
-#undef MM
-#undef UINT
Index: gcc/config/spu/spu-protos.h
===================================================================
--- gcc/config/spu/spu-protos.h	(revision 172767)
+++ gcc/config/spu/spu-protos.h	(working copy)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007, 2008, 2009, 2010
+/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is free software; you can redistribute it and/or modify it under
@@ -42,8 +42,8 @@ extern rtx hwint_to_const_double (enum m
 extern rtx spu_const (enum machine_mode mode, HOST_WIDE_INT val);
 extern rtx spu_const_from_ints (enum machine_mode mode, 
 			        int a, int b, int c, int d);
-extern struct rtx_def *spu_float_const (const char *string,
-					enum machine_mode mode);
+extern rtx spu_float_const (const char *string,
+			    enum machine_mode mode);
 extern int immediate_load_p (rtx op, enum machine_mode mode);
 extern int logical_immediate_p (rtx op, enum machine_mode mode);
 extern int iohl_immediate_p (rtx op, enum machine_mode mode);
Index: gcc/config/spu/spu.c
===================================================================
--- gcc/config/spu/spu.c	(revision 172767)
+++ gcc/config/spu/spu.c	(working copy)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is free software; you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free
@@ -3310,7 +3311,7 @@ spu_sched_adjust_cost (rtx insn, rtx lin
 }
 \f
 /* Create a CONST_DOUBLE from a string.  */
-struct rtx_def *
+rtx
 spu_float_const (const char *string, enum machine_mode mode)
 {
   REAL_VALUE_TYPE value;
Index: gcc/config/m32r/m32r-protos.h
===================================================================
--- gcc/config/m32r/m32r-protos.h	(revision 172767)
+++ 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 172767)
+++ 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
 \f
-union tree_node;
-#define TREE union tree_node *
-\f
 #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 172767)
+++ 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
-\f
 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_is_legitimate_constant (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 172767)
+++ 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/sh/sh-protos.h
===================================================================
--- gcc/config/sh/sh-protos.h	(revision 172767)
+++ gcc/config/sh/sh-protos.h	(working copy)
@@ -51,7 +51,7 @@ extern const char *output_movedouble (rt
 extern const char *output_movepcrel (rtx, rtx[], enum machine_mode);
 extern const char *output_far_jump (rtx, rtx);
 
-extern struct rtx_def *sfunc_uses_reg (rtx);
+extern rtx sfunc_uses_reg (rtx);
 extern int barrier_align (rtx);
 extern int sh_loop_align (rtx);
 extern int fp_zero_operand (rtx);
@@ -126,7 +126,7 @@ extern bool sh_vector_mode_supported_p (
 
 extern const char *output_jump_label_table (void);
 extern int sh_handle_pragma (int (*)(void), void (*)(int), const char *);
-extern struct rtx_def *get_fpscr_rtx (void);
+extern rtx get_fpscr_rtx (void);
 extern int sh_media_register_for_return (void);
 extern void sh_expand_prologue (void);
 extern void sh_expand_epilogue (bool);
Index: gcc/config/sh/sh.h
===================================================================
--- gcc/config/sh/sh.h	(revision 172767)
+++ gcc/config/sh/sh.h	(working copy)
@@ -2305,8 +2305,8 @@ struct sh_args {
   final_prescan_insn ((INSN), (OPVEC), (NOPERANDS))
 
 \f
-extern struct rtx_def *sh_compare_op0;
-extern struct rtx_def *sh_compare_op1;
+extern rtx sh_compare_op0;
+extern rtx sh_compare_op1;
 
 /* Which processor to schedule for.  The elements of the enumeration must
    match exactly the cpu attribute in the sh.md file.  */
Index: gcc/config/pdp11/pdp11.h
===================================================================
--- gcc/config/pdp11/pdp11.h	(revision 172767)
+++ gcc/config/pdp11/pdp11.h	(working copy)
@@ -508,7 +508,7 @@ extern int may_call_alloca;
 
 \f
 /* Tell emit-rtl.c how to initialize special values on a per-function base.  */
-extern struct rtx_def *cc0_reg_rtx;
+extern rtx cc0_reg_rtx;
 
 #define CC_STATUS_MDEP rtx
 
Index: gcc/config/microblaze/microblaze.h
===================================================================
--- gcc/config/microblaze/microblaze.h	(revision 172767)
+++ gcc/config/microblaze/microblaze.h	(working copy)
@@ -473,7 +473,7 @@ typedef struct microblaze_args
   /* Adjustments made to args pass in regs.  */
   /* ??? The size is doubled to work around a bug in the code that sets the 
      adjustments in function_arg.  */
-  struct rtx_def *adjust[MAX_ARGS_IN_REGISTERS * 2];
+  rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
 } CUMULATIVE_ARGS;
 
 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS)	\
Index: gcc/config/fr30/fr30.h
===================================================================
--- gcc/config/fr30/fr30.h	(revision 172767)
+++ gcc/config/fr30/fr30.h	(working copy)
@@ -845,11 +845,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
-
 /*}}}*/ \f
 
 /* Local Variables: */
Index: gcc/config/fr30/fr30-protos.h
===================================================================
--- gcc/config/fr30/fr30-protos.h	(revision 172767)
+++ 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/cris/cris-protos.h
===================================================================
--- gcc/config/cris/cris-protos.h	(revision 172767)
+++ gcc/config/cris/cris-protos.h	(working copy)
@@ -1,5 +1,6 @@
 /* Definitions for GCC.  Part of the machine description for CRIS.
-   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010
+   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010,
+   2011
    Free Software Foundation, Inc.
    Contributed by Axis Communications.
 
@@ -21,10 +22,6 @@ along with GCC; see the file COPYING3.
 
 /* Prototypes for the CRIS port.  */
 
-#if defined(FILE) || defined(stdin) || defined(stdout) || defined(getc) || defined(putc)
-#define STDIO_INCLUDED
-#endif
-
 extern bool cris_simple_epilogue (void);
 #ifdef RTX_CODE
 extern const char *cris_op_str (rtx);
Index: gcc/config/iq2000/iq2000.h
===================================================================
--- gcc/config/iq2000/iq2000.h	(revision 172767)
+++ gcc/config/iq2000/iq2000.h	(working copy)
@@ -314,7 +314,7 @@ typedef struct iq2000_args
   int fp_code;			/* Mode of FP arguments.  */
   unsigned int num_adjusts;	/* Number of adjustments made.  */
 				/* Adjustments made to args pass in regs.  */
-  struct rtx_def * adjust[MAX_ARGS_IN_REGISTERS * 2];
+  rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
 } CUMULATIVE_ARGS;
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
Index: gcc/config/mn10300/mn10300-protos.h
===================================================================
--- gcc/config/mn10300/mn10300-protos.h	(revision 172767)
+++ 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 (law@cygnus.com).
 
@@ -19,29 +19,26 @@
    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_hard_regno_mode_ok (unsigned int, enum machine_mode);
 extern bool  mn10300_legitimate_constant_p (rtx);
-extern bool  mn10300_modes_tieable (Mmode, Mmode);
-extern Cstar mn10300_output_add (rtx[3], bool);
+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);
@@ -51,7 +48,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/pa/pa-protos.h
===================================================================
--- gcc/config/pa/pa-protos.h	(revision 172767)
+++ gcc/config/pa/pa-protos.h	(working copy)
@@ -1,5 +1,5 @@
 /* Prototypes for pa.c functions used in the md file & elsewhere.
-   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
+   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011
    Free Software Foundation,
    Inc.
 
@@ -72,7 +72,7 @@ extern int attr_length_save_restore_dltp
 
 /* Declare functions defined in pa.c and used in templates.  */
 
-extern struct rtx_def *return_addr_rtx (int, rtx);
+extern rtx return_addr_rtx (int, rtx);
 
 #ifdef ARGS_SIZE_RTX
 /* expr.h defines ARGS_SIZE_RTX and `enum direction' */
Index: gcc/config/pa/pa.h
===================================================================
--- gcc/config/pa/pa.h	(revision 172767)
+++ gcc/config/pa/pa.h	(working copy)
@@ -351,7 +351,7 @@ typedef struct GTY(()) machine_function
 
 /* Function to return the rtx used to save the pic offset table register
    across function calls.  */
-extern struct rtx_def *hppa_pic_save_rtx (void);
+extern rtx hppa_pic_save_rtx (void);
 
 #define DEFAULT_PCC_STRUCT_RETURN 0
 
Index: gcc/config/h8300/h8300.h
===================================================================
--- gcc/config/h8300/h8300.h	(revision 172767)
+++ gcc/config/h8300/h8300.h	(working copy)
@@ -463,7 +463,7 @@ enum reg_class {
 struct cum_arg
 {
   int nbytes;
-  struct rtx_def *libcall;
+  rtx libcall;
 };
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
Index: gcc/config/v850/v850.h
===================================================================
--- gcc/config/v850/v850.h	(revision 172767)
+++ gcc/config/v850/v850.h	(working copy)
@@ -917,8 +917,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 172767)
+++ 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 172767)
+++ 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 *);
@@ -74,14 +73,14 @@ extern char *bfin_asm_short (void);
 extern int log2constp (unsigned HOST_WIDE_INT);
 
 extern bool bfin_legitimate_constant_p (rtx);
-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);
@@ -90,9 +89,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);
@@ -100,23 +101,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
 
Index: gcc/config/bfin/bfin.h
===================================================================
--- gcc/config/bfin/bfin.h	(revision 172767)
+++ gcc/config/bfin/bfin.h	(working copy)
@@ -1144,7 +1144,7 @@ do { 						\
 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) fprintf (FILE, "[SP--] = %s;\n", reg_names[REGNO])
 #define ASM_OUTPUT_REG_POP(FILE, REGNO)  fprintf (FILE, "%s = [SP++];\n", reg_names[REGNO])
 
-extern struct rtx_def *bfin_cc_rtx, *bfin_rets_rtx;
+extern rtx bfin_cc_rtx, bfin_rets_rtx;
 
 /* This works for GAS and some other assemblers.  */
 #define SET_ASM_OP              ".set "

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^2 Re: Target header etc. cleanup patch
  2011-04-20 21:26   ` Ping^2 " Joseph S. Myers
@ 2011-04-20 22:05     ` DJ Delorie
  2011-04-21  4:27     ` Paul Koning
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: DJ Delorie @ 2011-04-20 22:05 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches


The m32c one is OK

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^2 Re: Target header etc. cleanup patch
  2011-04-20 21:26   ` Ping^2 " Joseph S. Myers
  2011-04-20 22:05     ` DJ Delorie
@ 2011-04-21  4:27     ` Paul Koning
  2011-04-21  9:31     ` Richard Guenther
  2011-04-26 15:48     ` Ping^3 " Joseph S. Myers
  3 siblings, 0 replies; 24+ messages in thread
From: Paul Koning @ 2011-04-21  4:27 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches


On Apr 20, 2011, at 5:09 PM, Joseph S. Myers 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.
> ...

pdp11 is fine.  Thanks!

	paul


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^2 Re: Target header etc. cleanup patch
  2011-04-20 21:26   ` Ping^2 " Joseph S. Myers
  2011-04-20 22:05     ` DJ Delorie
  2011-04-21  4:27     ` Paul Koning
@ 2011-04-21  9:31     ` Richard Guenther
  2011-04-21 11:37       ` Joseph S. Myers
  2011-04-26 15:48     ` Ping^3 " Joseph S. Myers
  3 siblings, 1 reply; 24+ messages in thread
From: Richard Guenther @ 2011-04-21  9:31 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Wed, Apr 20, 2011 at 11:09 PM, Joseph S. Myers
<joseph@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).

Richard.

> 2011-04-20  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/alpha/alpha.c (struct machine_function): Use rtx, not
>        struct rtx_def *.
>        * config/bfin/bfin-protos.h (Mmode): Don't define.  Expand
>        definition where used.
>        * config/bfin/bfin.h (bfin_cc_rtx, bfin_rets_rtx): Use rtx, not
>        struct rtx_def *.
>        * config/cris/cris-protos.h (STDIO_INCLUDED): Don't define.
>        * config/fr30/fr30-protos.h (Mmode): Don't define.
>        * config/fr30/fr30.h (inhibit_libc): Don't define.
>        * config/h8300/h8300.h (struct cum_arg): Use rtx, not struct
>        rtx_def *.
>        * config/i386/cygming.h (union tree_node, TREE): Don't define or
>        undefine.
>        (FILE): Don't undefine.
>        * config/iq2000/iq2000.h (struct iq2000_args): Use rtx, not struct
>        rtx_def *.
>        * config/m32c/m32c-protos.h (MM, UINT): Don't define.  Expand
>        definitions where used.
>        * config/m32r/m32r-protos.h (Mmode): Don't define.  Expand
>        definition where used.
>        * config/microblaze/microblaze.h (struct microblaze_args): Use
>        rtx, not struct rtx_def *.
>        * config/mn10300/mn10300-protos.h (Mmode, Cstar, Rclas): Don't
>        define.  Expand definitions where used.
>        * config/pa/pa-protos.h (return_addr_rtx): Use rtx, not struct
>        rtx_def *.
>        * config/pa/pa.h (hppa_pic_save_rtx): Use rtx, not struct rtx_def
>        *.
>        * config/pdp11/pdp11.h (cc0_reg_rtx): Use rtx, not struct rtx_def
>        *.
>        * 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/sh/sh-protos.h (sfunc_uses_reg, get_fpscr_rtx): Use rtx,
>        not struct rtx_def *.
>        * config/sh/sh.h (sh_compare_op0, sh_compare_op1): Use rtx, not
>        struct rtx_def *.
>        * config/spu/spu-protos.h (spu_float_const): Use rtx, not struct
>        rtx_def *.
>        * config/spu/spu.c (spu_float_const): Use rtx, not struct rtx_def
>        *.
>        * 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/alpha/alpha.c
> ===================================================================
> --- gcc/config/alpha/alpha.c    (revision 172767)
> +++ gcc/config/alpha/alpha.c    (working copy)
> @@ -4606,7 +4606,7 @@ struct GTY(()) machine_function
>   const char *some_ld_name;
>
>   /* For TARGET_LD_BUGGY_LDGP.  */
> -  struct rtx_def *gp_save_rtx;
> +  rtx gp_save_rtx;
>
>   /* For VMS condition handlers.  */
>   bool uses_condition_handler;
> Index: gcc/config/m32c/m32c-protos.h
> ===================================================================
> --- gcc/config/m32c/m32c-protos.h       (revision 172767)
> +++ gcc/config/m32c/m32c-protos.h       (working copy)
> @@ -1,5 +1,5 @@
>  /* Target Prototypes for R8C/M16C/M32C
> -   Copyright (C) 2005, 2007, 2008, 2010
> +   Copyright (C) 2005, 2007, 2008, 2010, 2011
>    Free Software Foundation, Inc.
>    Contributed by Red Hat.
>
> @@ -19,12 +19,9 @@
>    along with GCC; see the file COPYING3.  If not see
>    <http://www.gnu.org/licenses/>.  */
>
> -#define MM enum machine_mode
> -#define UINT unsigned int
> -
>  void m32c_conditional_register_usage (void);
>  int  m32c_const_ok_for_constraint_p (HOST_WIDE_INT, char, const char *);
> -UINT m32c_dwarf_frame_regnum (int);
> +unsigned int m32c_dwarf_frame_regnum (int);
>  int  m32c_eh_return_data_regno (int);
>  void m32c_emit_epilogue (void);
>  void m32c_emit_prologue (void);
> @@ -47,8 +44,8 @@ int  m32c_trampoline_size (void);
>
>  #ifdef RTX_CODE
>
> -int  m32c_cannot_change_mode_class (MM, MM, int);
> -int  m32c_class_max_nregs (int, MM);
> +int  m32c_cannot_change_mode_class (enum machine_mode, enum machine_mode, int);
> +int  m32c_class_max_nregs (int, enum machine_mode);
>  rtx  m32c_eh_return_stackadj_rtx (void);
>  void m32c_emit_eh_epilogue (rtx);
>  int  m32c_expand_cmpstr (rtx *);
> @@ -60,20 +57,20 @@ void m32c_expand_neg_mulpsi3 (rtx *);
>  int  m32c_expand_setmemhi (rtx *);
>  int  m32c_extra_constraint_p (rtx, char, const char *);
>  int  m32c_extra_constraint_p2 (rtx, char, const char *);
> -int  m32c_hard_regno_nregs (int, MM);
> -int  m32c_hard_regno_ok (int, MM);
> +int  m32c_hard_regno_nregs (int, enum machine_mode);
> +int  m32c_hard_regno_ok (int, enum machine_mode);
>  bool m32c_illegal_subreg_p (rtx);
> -bool m32c_immd_dbl_mov (rtx *, MM);
> +bool m32c_immd_dbl_mov (rtx *, enum machine_mode);
>  rtx  m32c_incoming_return_addr_rtx (void);
>  int  m32c_legitimate_constant_p (rtx);
> -int  m32c_legitimize_reload_address (rtx *, MM, int, int, int);
> -int  m32c_limit_reload_class (MM, int);
> -int  m32c_modes_tieable_p (MM, MM);
> -bool m32c_mov_ok (rtx *, MM);
> +int  m32c_legitimize_reload_address (rtx *, enum machine_mode, int, int, int);
> +int  m32c_limit_reload_class (enum machine_mode, int);
> +int  m32c_modes_tieable_p (enum machine_mode, enum machine_mode);
> +bool m32c_mov_ok (rtx *, enum machine_mode);
>  char * m32c_output_compare (rtx, rtx *);
>  int  m32c_preferred_output_reload_class (rtx, int);
>  int  m32c_preferred_reload_class (rtx, int);
> -int  m32c_prepare_move (rtx *, MM);
> +int  m32c_prepare_move (rtx *, enum machine_mode);
>  int  m32c_prepare_shift (rtx *, int, int);
>  void m32c_print_operand (FILE *, rtx, int);
>  void m32c_print_operand_address (FILE *, rtx);
> @@ -81,8 +78,8 @@ int  m32c_reg_ok_for_base_p (rtx, int);
>  enum reg_class m32c_regno_reg_class (int);
>  rtx  m32c_return_addr_rtx (int);
>  const char *m32c_scc_pattern (rtx *, RTX_CODE);
> -int  m32c_secondary_reload_class (int, MM, rtx);
> -int  m32c_split_move (rtx *, MM, int);
> +int  m32c_secondary_reload_class (int, enum machine_mode, rtx);
> +int  m32c_split_move (rtx *, enum machine_mode, int);
>  int  m32c_split_psi_p (rtx *);
>  int current_function_special_page_vector (rtx);
>
> @@ -98,6 +95,3 @@ void m32c_output_aligned_common (FILE *,
>                                 int, int, int);
>
>  #endif
> -
> -#undef MM
> -#undef UINT
> Index: gcc/config/spu/spu-protos.h
> ===================================================================
> --- gcc/config/spu/spu-protos.h (revision 172767)
> +++ gcc/config/spu/spu-protos.h (working copy)
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2006, 2007, 2008, 2009, 2010
> +/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
>    Free Software Foundation, Inc.
>
>    This file is free software; you can redistribute it and/or modify it under
> @@ -42,8 +42,8 @@ extern rtx hwint_to_const_double (enum m
>  extern rtx spu_const (enum machine_mode mode, HOST_WIDE_INT val);
>  extern rtx spu_const_from_ints (enum machine_mode mode,
>                                int a, int b, int c, int d);
> -extern struct rtx_def *spu_float_const (const char *string,
> -                                       enum machine_mode mode);
> +extern rtx spu_float_const (const char *string,
> +                           enum machine_mode mode);
>  extern int immediate_load_p (rtx op, enum machine_mode mode);
>  extern int logical_immediate_p (rtx op, enum machine_mode mode);
>  extern int iohl_immediate_p (rtx op, enum machine_mode mode);
> Index: gcc/config/spu/spu.c
> ===================================================================
> --- gcc/config/spu/spu.c        (revision 172767)
> +++ gcc/config/spu/spu.c        (working copy)
> @@ -1,4 +1,5 @@
> -/* Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
> +   Free Software Foundation, Inc.
>
>    This file is free software; you can redistribute it and/or modify it under
>    the terms of the GNU General Public License as published by the Free
> @@ -3310,7 +3311,7 @@ spu_sched_adjust_cost (rtx insn, rtx lin
>  }
>
>  /* Create a CONST_DOUBLE from a string.  */
> -struct rtx_def *
> +rtx
>  spu_float_const (const char *string, enum machine_mode mode)
>  {
>   REAL_VALUE_TYPE value;
> Index: gcc/config/m32r/m32r-protos.h
> ===================================================================
> --- gcc/config/m32r/m32r-protos.h       (revision 172767)
> +++ 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 172767)
> +++ 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 172767)
> +++ 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_is_legitimate_constant (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 172767)
> +++ 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/sh/sh-protos.h
> ===================================================================
> --- gcc/config/sh/sh-protos.h   (revision 172767)
> +++ gcc/config/sh/sh-protos.h   (working copy)
> @@ -51,7 +51,7 @@ extern const char *output_movedouble (rt
>  extern const char *output_movepcrel (rtx, rtx[], enum machine_mode);
>  extern const char *output_far_jump (rtx, rtx);
>
> -extern struct rtx_def *sfunc_uses_reg (rtx);
> +extern rtx sfunc_uses_reg (rtx);
>  extern int barrier_align (rtx);
>  extern int sh_loop_align (rtx);
>  extern int fp_zero_operand (rtx);
> @@ -126,7 +126,7 @@ extern bool sh_vector_mode_supported_p (
>
>  extern const char *output_jump_label_table (void);
>  extern int sh_handle_pragma (int (*)(void), void (*)(int), const char *);
> -extern struct rtx_def *get_fpscr_rtx (void);
> +extern rtx get_fpscr_rtx (void);
>  extern int sh_media_register_for_return (void);
>  extern void sh_expand_prologue (void);
>  extern void sh_expand_epilogue (bool);
> Index: gcc/config/sh/sh.h
> ===================================================================
> --- gcc/config/sh/sh.h  (revision 172767)
> +++ gcc/config/sh/sh.h  (working copy)
> @@ -2305,8 +2305,8 @@ struct sh_args {
>   final_prescan_insn ((INSN), (OPVEC), (NOPERANDS))
>
>
> -extern struct rtx_def *sh_compare_op0;
> -extern struct rtx_def *sh_compare_op1;
> +extern rtx sh_compare_op0;
> +extern rtx sh_compare_op1;
>
>  /* Which processor to schedule for.  The elements of the enumeration must
>    match exactly the cpu attribute in the sh.md file.  */
> Index: gcc/config/pdp11/pdp11.h
> ===================================================================
> --- gcc/config/pdp11/pdp11.h    (revision 172767)
> +++ gcc/config/pdp11/pdp11.h    (working copy)
> @@ -508,7 +508,7 @@ extern int may_call_alloca;
>
>
>  /* Tell emit-rtl.c how to initialize special values on a per-function base.  */
> -extern struct rtx_def *cc0_reg_rtx;
> +extern rtx cc0_reg_rtx;
>
>  #define CC_STATUS_MDEP rtx
>
> Index: gcc/config/microblaze/microblaze.h
> ===================================================================
> --- gcc/config/microblaze/microblaze.h  (revision 172767)
> +++ gcc/config/microblaze/microblaze.h  (working copy)
> @@ -473,7 +473,7 @@ typedef struct microblaze_args
>   /* Adjustments made to args pass in regs.  */
>   /* ??? The size is doubled to work around a bug in the code that sets the
>      adjustments in function_arg.  */
> -  struct rtx_def *adjust[MAX_ARGS_IN_REGISTERS * 2];
> +  rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
>  } CUMULATIVE_ARGS;
>
>  #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS)   \
> Index: gcc/config/fr30/fr30.h
> ===================================================================
> --- gcc/config/fr30/fr30.h      (revision 172767)
> +++ gcc/config/fr30/fr30.h      (working copy)
> @@ -845,11 +845,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 172767)
> +++ 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/cris/cris-protos.h
> ===================================================================
> --- gcc/config/cris/cris-protos.h       (revision 172767)
> +++ gcc/config/cris/cris-protos.h       (working copy)
> @@ -1,5 +1,6 @@
>  /* Definitions for GCC.  Part of the machine description for CRIS.
> -   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010
> +   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010,
> +   2011
>    Free Software Foundation, Inc.
>    Contributed by Axis Communications.
>
> @@ -21,10 +22,6 @@ along with GCC; see the file COPYING3.
>
>  /* Prototypes for the CRIS port.  */
>
> -#if defined(FILE) || defined(stdin) || defined(stdout) || defined(getc) || defined(putc)
> -#define STDIO_INCLUDED
> -#endif
> -
>  extern bool cris_simple_epilogue (void);
>  #ifdef RTX_CODE
>  extern const char *cris_op_str (rtx);
> Index: gcc/config/iq2000/iq2000.h
> ===================================================================
> --- gcc/config/iq2000/iq2000.h  (revision 172767)
> +++ gcc/config/iq2000/iq2000.h  (working copy)
> @@ -314,7 +314,7 @@ typedef struct iq2000_args
>   int fp_code;                 /* Mode of FP arguments.  */
>   unsigned int num_adjusts;    /* Number of adjustments made.  */
>                                /* Adjustments made to args pass in regs.  */
> -  struct rtx_def * adjust[MAX_ARGS_IN_REGISTERS * 2];
> +  rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
>  } CUMULATIVE_ARGS;
>
>  /* Initialize a variable CUM of type CUMULATIVE_ARGS
> Index: gcc/config/mn10300/mn10300-protos.h
> ===================================================================
> --- gcc/config/mn10300/mn10300-protos.h (revision 172767)
> +++ 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 (law@cygnus.com).
>
> @@ -19,29 +19,26 @@
>    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_hard_regno_mode_ok (unsigned int, enum machine_mode);
>  extern bool  mn10300_legitimate_constant_p (rtx);
> -extern bool  mn10300_modes_tieable (Mmode, Mmode);
> -extern Cstar mn10300_output_add (rtx[3], bool);
> +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);
> @@ -51,7 +48,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/pa/pa-protos.h
> ===================================================================
> --- gcc/config/pa/pa-protos.h   (revision 172767)
> +++ gcc/config/pa/pa-protos.h   (working copy)
> @@ -1,5 +1,5 @@
>  /* Prototypes for pa.c functions used in the md file & elsewhere.
> -   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
> +   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011
>    Free Software Foundation,
>    Inc.
>
> @@ -72,7 +72,7 @@ extern int attr_length_save_restore_dltp
>
>  /* Declare functions defined in pa.c and used in templates.  */
>
> -extern struct rtx_def *return_addr_rtx (int, rtx);
> +extern rtx return_addr_rtx (int, rtx);
>
>  #ifdef ARGS_SIZE_RTX
>  /* expr.h defines ARGS_SIZE_RTX and `enum direction' */
> Index: gcc/config/pa/pa.h
> ===================================================================
> --- gcc/config/pa/pa.h  (revision 172767)
> +++ gcc/config/pa/pa.h  (working copy)
> @@ -351,7 +351,7 @@ typedef struct GTY(()) machine_function
>
>  /* Function to return the rtx used to save the pic offset table register
>    across function calls.  */
> -extern struct rtx_def *hppa_pic_save_rtx (void);
> +extern rtx hppa_pic_save_rtx (void);
>
>  #define DEFAULT_PCC_STRUCT_RETURN 0
>
> Index: gcc/config/h8300/h8300.h
> ===================================================================
> --- gcc/config/h8300/h8300.h    (revision 172767)
> +++ gcc/config/h8300/h8300.h    (working copy)
> @@ -463,7 +463,7 @@ enum reg_class {
>  struct cum_arg
>  {
>   int nbytes;
> -  struct rtx_def *libcall;
> +  rtx libcall;
>  };
>
>  /* Initialize a variable CUM of type CUMULATIVE_ARGS
> Index: gcc/config/v850/v850.h
> ===================================================================
> --- gcc/config/v850/v850.h      (revision 172767)
> +++ gcc/config/v850/v850.h      (working copy)
> @@ -917,8 +917,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 172767)
> +++ 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 172767)
> +++ 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 *);
> @@ -74,14 +73,14 @@ extern char *bfin_asm_short (void);
>  extern int log2constp (unsigned HOST_WIDE_INT);
>
>  extern bool bfin_legitimate_constant_p (rtx);
> -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);
> @@ -90,9 +89,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);
> @@ -100,23 +101,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
>
> Index: gcc/config/bfin/bfin.h
> ===================================================================
> --- gcc/config/bfin/bfin.h      (revision 172767)
> +++ gcc/config/bfin/bfin.h      (working copy)
> @@ -1144,7 +1144,7 @@ do {                                              \
>  #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) fprintf (FILE, "[SP--] = %s;\n", reg_names[REGNO])
>  #define ASM_OUTPUT_REG_POP(FILE, REGNO)  fprintf (FILE, "%s = [SP++];\n", reg_names[REGNO])
>
> -extern struct rtx_def *bfin_cc_rtx, *bfin_rets_rtx;
> +extern rtx bfin_cc_rtx, bfin_rets_rtx;
>
>  /* This works for GAS and some other assemblers.  */
>  #define SET_ASM_OP              ".set "
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^2 Re: Target header etc. cleanup patch
  2011-04-21  9:31     ` Richard Guenther
@ 2011-04-21 11:37       ` Joseph S. Myers
  2011-04-21 11:50         ` Kai Tietz
                           ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Joseph S. Myers @ 2011-04-21 11:37 UTC (permalink / raw)
  To: Richard Guenther
  Cc: gcc-patches, bernds, nickc, cgf, ktietz, dave.korn.cygwin, law, aoliva

[-- Attachment #1: Type: TEXT/PLAIN, Size: 17986 bytes --]

On Thu, 21 Apr 2011, Richard Guenther wrote:

> On Wed, Apr 20, 2011 at 11:09 PM, Joseph S. Myers
> <joseph@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  <joseph@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
 \f
-union tree_node;
-#define TREE union tree_node *
-\f
 #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
-\f
 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
-
 /*}}}*/ \f
 
 /* 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 (law@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
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^2 Re: Target header etc. cleanup patch
  2011-04-21 11:37       ` Joseph S. Myers
@ 2011-04-21 11:50         ` Kai Tietz
  2011-04-22  4:59         ` Jie Zhang
  2011-05-04  3:15         ` Alexandre Oliva
  2 siblings, 0 replies; 24+ messages in thread
From: Kai Tietz @ 2011-04-21 11:50 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: gcc-patches, bernds, nickc, cgf, dave korn cygwin, law, aoliva,
	Richard Guenther

Joseph,

mingw part is ok, too.

Thanks,
Kai

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^2 Re: Target header etc. cleanup patch
  2011-04-21 11:37       ` Joseph S. Myers
  2011-04-21 11:50         ` Kai Tietz
@ 2011-04-22  4:59         ` Jie Zhang
  2011-04-26 17:40           ` Christopher Faylor
  2011-05-04  3:15         ` Alexandre Oliva
  2 siblings, 1 reply; 24+ messages in thread
From: Jie Zhang @ 2011-04-22  4:59 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: Richard Guenther, gcc-patches, bernds, nickc, cgf, ktietz,
	dave.korn.cygwin, law, aoliva

On 04/21/2011 06:06 AM, Joseph S. Myers wrote:
> On Thu, 21 Apr 2011, Richard Guenther wrote:
>
>> On Wed, Apr 20, 2011 at 11:09 PM, Joseph S. Myers
>> <joseph@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<joseph@codesourcery.com>
>
> 	* config/bfin/bfin-protos.h (Mmode): Don't define.  Expand
> 	definition where used.

OK for bfin. Thanks!

btw, this patch cannot be easily applied because there are some strange 
characters in it. See the [Raw text] link in

http://gcc.gnu.org/ml/gcc-patches/2011-04/msg01755.html


Jie

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Ping^3 Re: Target header etc. cleanup patch
  2011-04-20 21:26   ` Ping^2 " Joseph S. Myers
                       ` (2 preceding siblings ...)
  2011-04-21  9:31     ` Richard Guenther
@ 2011-04-26 15:48     ` Joseph S. Myers
  2011-04-26 16:32       ` Nick Clifton
  2011-05-02 15:22       ` Ping^4 " Joseph S. Myers
  3 siblings, 2 replies; 24+ messages in thread
From: Joseph S. Myers @ 2011-04-26 15:48 UTC (permalink / raw)
  To: gcc-patches; +Cc: nickc, law, aoliva

Ping^3.  Parts of this patch 
<http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00130.html> are still 
pending review: the parts for targets fr30, m32r, mn10300, rx, v850 
(target maintainers CC:ed).  This version applies cleanly to current 
trunk.

2011-04-26  Joseph Myers  <joseph@codesourcery.com>

	* config/fr30/fr30-protos.h (Mmode): Don't define.
	* config/fr30/fr30.h (inhibit_libc): Don't define.
	* 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 172860)
+++ 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/rx/rx-protos.h
===================================================================
--- gcc/config/rx/rx-protos.h	(revision 172860)
+++ 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
-\f
 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 172860)
+++ 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 172860)
+++ 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
-
 /*}}}*/ \f
 
 /* Local Variables: */
Index: gcc/config/fr30/fr30-protos.h
===================================================================
--- gcc/config/fr30/fr30-protos.h	(revision 172860)
+++ 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 172860)
+++ 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 (law@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 172860)
+++ 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 172860)
+++ 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 */

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^3 Re: Target header etc. cleanup patch
  2011-04-26 15:48     ` Ping^3 " Joseph S. Myers
@ 2011-04-26 16:32       ` Nick Clifton
  2011-04-26 16:48         ` Joseph S. Myers
  2011-05-02 15:22       ` Ping^4 " Joseph S. Myers
  1 sibling, 1 reply; 24+ messages in thread
From: Nick Clifton @ 2011-04-26 16:32 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, law, aoliva

Hi Joseph,

> 2011-04-26  Joseph Myers<joseph@codesourcery.com>
>
> 	* config/fr30/fr30-protos.h (Mmode): Don't define.
> 	* config/fr30/fr30.h (inhibit_libc): Don't define.
> 	* 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 *.

I am not keen on the removal of the Mmode macro.  I think that having it 
makes the prototypes cleaner and easier to read.  I accept that it is 
silly for individual targets to define the macro on their own.  But in 
my opinion the "enum machine_mode" type deserves its own abbreviating 
definition like rtx or tree.

Similarly it would be nice to standard abbreviations for 
CUMULATIVE_ARGS, enum rtx_code, enum reg_class and const char *.  What 
do you think ?  I suspect that I am alone in this desire, in which case 
I will bow to public opinion and approve the whole patch.  But in the 
meantime I am happy with the other parts:


> Index: gcc/config/m32r/m32r-protos.h
> ===================================================================

> -/* Function prototypes that cannot exist in v850.h due to dependency
> +/* Function prototypes that cannot exist in m32r.h due to dependency

Approved.


> Index: gcc/config/fr30/fr30.h
> ===================================================================

> -/* 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
> -

Approved.


> Index: gcc/config/v850/v850.h
> ===================================================================

> -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];

Approved.

Cheers
   Nick

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^3 Re: Target header etc. cleanup patch
  2011-04-26 16:32       ` Nick Clifton
@ 2011-04-26 16:48         ` Joseph S. Myers
  0 siblings, 0 replies; 24+ messages in thread
From: Joseph S. Myers @ 2011-04-26 16:48 UTC (permalink / raw)
  To: Nick Clifton; +Cc: gcc-patches, law, aoliva

On Tue, 26 Apr 2011, Nick Clifton wrote:

> Similarly it would be nice to standard abbreviations for CUMULATIVE_ARGS, enum
> rtx_code, enum reg_class and const char *.  What do you think ?  I suspect

I think defining an abbreviation for const char * is actively bad, since 
const char * is a standard C idiom as-is and inventing local names for 
something with a standard C name should be avoided unless you are 
genuinely adding GCC-specific semantics.  (Yes, HOST_WIDEST_INT ought to 
be replaced by intmax_t/uintmax_t.)

My position on CUMULATIVE_ARGS remains that this type should become 
private to each back end and not visible in any code outside of config/ - 
with dynamic conversions from a target-independent type being used by the 
affected hooks.  (See PR 46500.)  Once the type is private to the back 
ends, they can also use a name other than CUMULATIVE_ARGS if they wish - 
but a typedef rather than a #define, please.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^2 Re: Target header etc. cleanup patch
  2011-04-22  4:59         ` Jie Zhang
@ 2011-04-26 17:40           ` Christopher Faylor
  0 siblings, 0 replies; 24+ messages in thread
From: Christopher Faylor @ 2011-04-26 17:40 UTC (permalink / raw)
  To: Jie Zhang, nickc, dave.korn.cygwin, gcc-patches, Joseph S. Myers,
	cgf, law, Richard Guenther, bernds, aoliva, ktietz

On Thu, Apr 21, 2011 at 11:56:52PM -0400, Jie Zhang wrote:
>On 04/21/2011 06:06 AM, Joseph S. Myers wrote:
>> On Thu, 21 Apr 2011, Richard Guenther wrote:
>>
>>> On Wed, Apr 20, 2011 at 11:09 PM, Joseph S. Myers
>>> <joseph@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<joseph@codesourcery.com>
>>
>> 	* config/bfin/bfin-protos.h (Mmode): Don't define.  Expand
>> 	definition where used.
>
>OK for bfin. Thanks!

Don't know if you've heard from anyone else yet but, in case not: ok for Windows.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Ping^4 Re: Target header etc. cleanup patch
  2011-04-26 15:48     ` Ping^3 " Joseph S. Myers
  2011-04-26 16:32       ` Nick Clifton
@ 2011-05-02 15:22       ` Joseph S. Myers
  2011-05-02 15:27         ` Richard Guenther
  2011-05-03  8:16         ` Nick Clifton
  1 sibling, 2 replies; 24+ messages in thread
From: Joseph S. Myers @ 2011-05-02 15:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: nickc, law, aoliva

Ping^4.  Parts of this patch 
<http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00130.html> are still 
pending review, for targets fr30, m32r, mn10300, rx, v850 (target 
maintainers CC:ed).  This version applies cleanly to current trunk.

I have seen no comments from the mn10300 maintainers.  For the other 
targets, Nick wanted to keep abbreviations for certain types 
<http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02047.html> and no-one else 
has commented on that issue, though as I noted in 
<http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02048.html> I think 
abbreviating const char * is actively bad.  Cstar - defined for mn10300, 
whose maintainers haven't commented - is also the macro I care most about 
getting rid of in what's left of this patch, as it's the one that shows up 
as a false positive in my target macro listing script (the point of the 
original patch was to get rid of several such false positives, plus making 
related cleanups that showed up in the process).

2011-05-02  Joseph Myers  <joseph@codesourcery.com>

	* config/fr30/fr30-protos.h (Mmode): Don't define.
	* 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.

Index: gcc/config/m32r/m32r-protos.h
===================================================================
--- gcc/config/m32r/m32r-protos.h	(revision 173254)
+++ gcc/config/m32r/m32r-protos.h	(working copy)
@@ -21,7 +21,6 @@
 
 /* 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);
@@ -52,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/rx/rx-protos.h
===================================================================
--- gcc/config/rx/rx-protos.h	(revision 173254)
+++ 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
-\f
 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 173254)
+++ 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-protos.h
===================================================================
--- gcc/config/fr30/fr30-protos.h	(revision 173254)
+++ 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 173254)
+++ 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 (law@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-protos.h
===================================================================
--- gcc/config/v850/v850-protos.h	(revision 173254)
+++ 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 */

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^4 Re: Target header etc. cleanup patch
  2011-05-02 15:22       ` Ping^4 " Joseph S. Myers
@ 2011-05-02 15:27         ` Richard Guenther
  2011-05-02 18:22           ` Bernd Schmidt
  2011-05-03  8:16         ` Nick Clifton
  1 sibling, 1 reply; 24+ messages in thread
From: Richard Guenther @ 2011-05-02 15:27 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, nickc, law, aoliva

On Mon, May 2, 2011 at 5:21 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> Ping^4.  Parts of this patch
> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00130.html> are still
> pending review, for targets fr30, m32r, mn10300, rx, v850 (target
> maintainers CC:ed).  This version applies cleanly to current trunk.
>
> I have seen no comments from the mn10300 maintainers.  For the other
> targets, Nick wanted to keep abbreviations for certain types
> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02047.html> and no-one else
> has commented on that issue, though as I noted in
> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02048.html> I think
> abbreviating const char * is actively bad.  Cstar - defined for mn10300,
> whose maintainers haven't commented - is also the macro I care most about
> getting rid of in what's left of this patch, as it's the one that shows up
> as a false positive in my target macro listing script (the point of the
> original patch was to get rid of several such false positives, plus making
> related cleanups that showed up in the process).

Ok except for the changes the target maintainer objects to.  I do agree
with Joseph and if another maintainer also says Ok I think we should
overrule him.

Thanks,
Richard.

> 2011-05-02  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/fr30/fr30-protos.h (Mmode): Don't define.
>        * 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.
>
> Index: gcc/config/m32r/m32r-protos.h
> ===================================================================
> --- gcc/config/m32r/m32r-protos.h       (revision 173254)
> +++ gcc/config/m32r/m32r-protos.h       (working copy)
> @@ -21,7 +21,6 @@
>
>  /* 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);
> @@ -52,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/rx/rx-protos.h
> ===================================================================
> --- gcc/config/rx/rx-protos.h   (revision 173254)
> +++ 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 173254)
> +++ 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-protos.h
> ===================================================================
> --- gcc/config/fr30/fr30-protos.h       (revision 173254)
> +++ 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 173254)
> +++ 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 (law@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-protos.h
> ===================================================================
> --- gcc/config/v850/v850-protos.h       (revision 173254)
> +++ 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 */
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^4 Re: Target header etc. cleanup patch
  2011-05-02 15:27         ` Richard Guenther
@ 2011-05-02 18:22           ` Bernd Schmidt
  0 siblings, 0 replies; 24+ messages in thread
From: Bernd Schmidt @ 2011-05-02 18:22 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Joseph S. Myers, gcc-patches, nickc, law, aoliva

On 05/02/2011 05:27 PM, Richard Guenther wrote:
> On Mon, May 2, 2011 at 5:21 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
>> Ping^4.  Parts of this patch
>> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00130.html> are still
>> pending review, for targets fr30, m32r, mn10300, rx, v850 (target
>> maintainers CC:ed).  This version applies cleanly to current trunk.
>>
>> I have seen no comments from the mn10300 maintainers.  For the other
>> targets, Nick wanted to keep abbreviations for certain types
>> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02047.html> and no-one else
>> has commented on that issue, though as I noted in
>> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02048.html> I think
>> abbreviating const char * is actively bad.  Cstar - defined for mn10300,
>> whose maintainers haven't commented - is also the macro I care most about
>> getting rid of in what's left of this patch, as it's the one that shows up
>> as a false positive in my target macro listing script (the point of the
>> original patch was to get rid of several such false positives, plus making
>> related cleanups that showed up in the process).
> 
> Ok except for the changes the target maintainer objects to.  I do agree
> with Joseph and if another maintainer also says Ok I think we should
> overrule him.

I'll say OK then.


Bernd

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^4 Re: Target header etc. cleanup patch
  2011-05-02 15:22       ` Ping^4 " Joseph S. Myers
  2011-05-02 15:27         ` Richard Guenther
@ 2011-05-03  8:16         ` Nick Clifton
  1 sibling, 0 replies; 24+ messages in thread
From: Nick Clifton @ 2011-05-03  8:16 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, law, aoliva

Hi Joseph,

> I have seen no comments from the mn10300 maintainers.
> I think
> abbreviating const char * is actively bad.  Cstar - defined for mn10300,
> whose maintainers haven't commented

Whilst I am not a maintainer for the MN10300, I am the author of that 
bit of code.  I can say that I have no objections to removing the use of 
Cstar, it was just a syntactic shorthand, and not a very nice one at that.

If you do not get a response from Jeff or Alex you might like to ping 
rth, as he has been actively reviewing my recent MN10300 patches.

Cheers
   Nick



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Ping^2 Re: Target header etc. cleanup patch
  2011-04-21 11:37       ` Joseph S. Myers
  2011-04-21 11:50         ` Kai Tietz
  2011-04-22  4:59         ` Jie Zhang
@ 2011-05-04  3:15         ` Alexandre Oliva
  2 siblings, 0 replies; 24+ messages in thread
From: Alexandre Oliva @ 2011-05-04  3:15 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: Richard Guenther, gcc-patches, bernds, nickc, cgf, ktietz,
	dave.korn.cygwin, law

On Apr 21, 2011, "Joseph S. Myers" <joseph@codesourcery.com> wrote:

> 	* config/mn10300/mn10300-protos.h (Mmode, Cstar, Rclas): Don't
> 	define.  Expand definitions where used.

Ok, thanks

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2011-05-04  3:07 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-02 17:06 Target header etc. cleanup patch Joseph S. Myers
2011-04-02 17:16 ` Paul Koning
2011-04-04 10:33 ` Joseph S. Myers
2011-04-08 18:46 ` Ping " Joseph S. Myers
2011-04-08 19:14   ` Mike Stump
2011-04-20 21:26   ` Ping^2 " Joseph S. Myers
2011-04-20 22:05     ` DJ Delorie
2011-04-21  4:27     ` Paul Koning
2011-04-21  9:31     ` Richard Guenther
2011-04-21 11:37       ` Joseph S. Myers
2011-04-21 11:50         ` Kai Tietz
2011-04-22  4:59         ` Jie Zhang
2011-04-26 17:40           ` Christopher Faylor
2011-05-04  3:15         ` Alexandre Oliva
2011-04-26 15:48     ` Ping^3 " Joseph S. Myers
2011-04-26 16:32       ` Nick Clifton
2011-04-26 16:48         ` Joseph S. Myers
2011-05-02 15:22       ` Ping^4 " Joseph S. Myers
2011-05-02 15:27         ` Richard Guenther
2011-05-02 18:22           ` Bernd Schmidt
2011-05-03  8:16         ` Nick Clifton
2011-04-12  1:08 ` Hans-Peter Nilsson
2011-04-12 12:08   ` Joseph S. Myers
2011-04-12 12:14     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).