This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Poison PROMOTE_FUNCTION_ARGS, STRUCT_VALUE_INCOMING, andSTRICT_ARGUMENT_NAMING.


Hi,

Attached is a patch to poison PROMOTE_FUNCTION_ARGS,
STRUCT_VALUE_INCOMING, and STRICT_ARGUMENT_NAMING, and clean up
related things.

The only notable things is that default_promote_function_args
collapses down to hook_bool_tree_false, so I've removed the former.

Bootstrapped on i686-pc-linux-gnu OK to apply?

Kazu Hirata

2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>

	* system.h (PROMOTE_FUNCTION_ARGS, STRUCT_VALUE_INCOMING, and
	STRICT_ARGUMENT_NAMING): Poison.
	* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS): Define as
	hook_bool_tree_false.
	* targhooks.c (default_promote_function_args): Remove.
	(default_struct_value_rtx): Don't use STRUCT_VALUE_INCOMING.
	Don't check incoming.
	(default_strict_argument_naming): Don't use
	STRICT_ARGUMENT_NAMING.
	* targhooks.h: Remove the prototype for
	default_promote_function_args.

Index: system.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/system.h,v
retrieving revision 1.191
diff -c -r1.191 system.h
*** system.h	27 Jan 2004 02:33:18 -0000	1.191
--- system.h	31 Jan 2004 00:24:05 -0000
***************
*** 602,608 ****
  	DIVDI3_LIBCALL UDIVSI3_LIBCALL UDIVDI3_LIBCALL MODSI3_LIBCALL	\
  	MODDI3_LIBCALL UMODSI3_LIBCALL UMODDI3_LIBCALL BUILD_VA_LIST_TYPE \
  	PRETEND_OUTGOING_VARARGS_NAMED STRUCT_VALUE_INCOMING_REGNUM	\
! 	ASM_OUTPUT_SECTION_NAME
  
  /* Other obsolete target macros, or macros that used to be in target
     headers and were not used, and may be obsolete or may never have
--- 602,609 ----
  	DIVDI3_LIBCALL UDIVSI3_LIBCALL UDIVDI3_LIBCALL MODSI3_LIBCALL	\
  	MODDI3_LIBCALL UMODSI3_LIBCALL UMODDI3_LIBCALL BUILD_VA_LIST_TYPE \
  	PRETEND_OUTGOING_VARARGS_NAMED STRUCT_VALUE_INCOMING_REGNUM	\
! 	ASM_OUTPUT_SECTION_NAME PROMOTE_FUNCTION_ARGS			\
! 	STRUCT_VALUE_INCOMING STRICT_ARGUMENT_NAMING
  
  /* Other obsolete target macros, or macros that used to be in target
     headers and were not used, and may be obsolete or may never have
Index: target-def.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target-def.h,v
retrieving revision 1.64
diff -c -r1.64 target-def.h
*** target-def.h	23 Jan 2004 21:05:18 -0000	1.64
--- target-def.h	31 Jan 2004 00:24:05 -0000
***************
*** 325,331 ****
  #define TARGET_GET_PCH_VALIDITY default_get_pch_validity
  #define TARGET_PCH_VALID_P default_pch_valid_p
  
! #define TARGET_PROMOTE_FUNCTION_ARGS default_promote_function_args
  #define TARGET_PROMOTE_FUNCTION_RETURN default_promote_function_return
  #define TARGET_PROMOTE_PROTOTYPES default_promote_prototypes
  
--- 325,331 ----
  #define TARGET_GET_PCH_VALIDITY default_get_pch_validity
  #define TARGET_PCH_VALID_P default_pch_valid_p
  
! #define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_false
  #define TARGET_PROMOTE_FUNCTION_RETURN default_promote_function_return
  #define TARGET_PROMOTE_PROTOTYPES default_promote_prototypes
  
Index: targhooks.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/targhooks.c,v
retrieving revision 2.14
diff -c -r2.14 targhooks.c
*** targhooks.c	23 Jan 2004 21:05:18 -0000	2.14
--- targhooks.c	31 Jan 2004 00:24:05 -0000
***************
*** 79,94 ****
  }
  
  bool
- default_promote_function_args (tree fntype ATTRIBUTE_UNUSED)
- {
- #ifdef PROMOTE_FUNCTION_ARGS
-   return true;
- #else
-   return false;
- #endif
- }
- 
- bool
  default_promote_function_return (tree fntype ATTRIBUTE_UNUSED)
  {
  #ifdef PROMOTE_FUNCTION_RETURN
--- 79,84 ----
***************
*** 108,145 ****
  }
  
  rtx
! default_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED, int incoming)
  {
-   rtx rv = 0;
-   if (incoming)
-     {
- #ifdef STRUCT_VALUE_INCOMING
-       rv = STRUCT_VALUE_INCOMING;
- #else
  #ifdef STRUCT_VALUE
!       rv = STRUCT_VALUE;
  #else
! #ifndef STRUCT_VALUE_REGNUM
!       abort();
  #else
!       rv = gen_rtx_REG (Pmode, STRUCT_VALUE_REGNUM);
! #endif
  #endif
  #endif
-     }
-   else
-     {
- #ifdef STRUCT_VALUE
-       rv = STRUCT_VALUE;
- #else
- #ifndef STRUCT_VALUE_REGNUM
-       abort();
- #else
-       rv = gen_rtx_REG (Pmode, STRUCT_VALUE_REGNUM);
- #endif
- #endif
-     }
-   return rv;
  }
  
  bool
--- 98,115 ----
  }
  
  rtx
! default_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
! 			  int incoming ATTRIBUTE_UNUSED)
  {
  #ifdef STRUCT_VALUE
!   return STRUCT_VALUE;
  #else
! #ifdef STRUCT_VALUE_REGNUM
!   return gen_rtx_REG (Pmode, STRUCT_VALUE_REGNUM);
  #else
!   abort ();
  #endif
  #endif
  }
  
  bool
***************
*** 179,189 ****
  bool
  default_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
  {
! #ifdef STRICT_ARGUMENT_NAMING
!   return STRICT_ARGUMENT_NAMING;
! #else
!   return 0;
! #endif
  }
  
  bool
--- 149,155 ----
  bool
  default_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
  {
!   return false;
  }
  
  bool
Index: targhooks.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/targhooks.h,v
retrieving revision 2.6
diff -c -r2.6 targhooks.h
*** targhooks.h	23 Jan 2004 21:05:18 -0000	2.6
--- targhooks.h	31 Jan 2004 00:24:05 -0000
***************
*** 23,29 ****
  extern enum machine_mode default_cc_modes_compatible (enum machine_mode,
  						      enum machine_mode);
  
- extern bool default_promote_function_args (tree);
  extern bool default_promote_function_return (tree);
  extern bool default_promote_prototypes (tree);
  
--- 23,28 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]