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] i386: Hookize some target macros.


Hi,

Attached is a patch to hookize some target macros.

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

Kazu Hirata

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

	* config/i386/i386.c (TARGET_PROMOTE_PROTOTYPES): New.
	(TARGET_STRUCT_VALUE_RTX): Likewise.
	* config/i386/i386.h (STRUCT_VALUE_INCOMING): Remove.
	(STRUCT_VALUE): Likewise.
	(PROMOTE_PROTOTYPES): Likewise.

Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.635
diff -u -r1.635 i386.c
--- i386.c	16 Jan 2004 18:53:44 -0000	1.635
+++ i386.c	18 Jan 2004 22:33:06 -0000
@@ -1016,6 +1016,12 @@
 #undef TARGET_BUILD_BUILTIN_VA_LIST
 #define TARGET_BUILD_BUILTIN_VA_LIST ix86_build_builtin_va_list
 
+#undef TARGET_PROMOTE_PROTOTYPES
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+
+#undef TARGET_STRUCT_VALUE_RTX
+#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* The svr4 ABI for the i386 says that records and unions are returned
Index: i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.368
diff -u -r1.368 i386.h
--- i386.h	14 Jan 2004 23:07:04 -0000	1.368
+++ i386.h	18 Jan 2004 22:33:08 -0000
@@ -1207,15 +1207,6 @@
 
 #define GOT_SYMBOL_NAME "_GLOBAL_OFFSET_TABLE_"
 
-/* Register in which address to store a structure value
-   arrives in the function.  On the 386, the prologue
-   copies this from the stack to register %eax.  */
-#define STRUCT_VALUE_INCOMING 0
-
-/* Place in which caller passes the structure value address.
-   0 means push the value on the stack like an argument.  */
-#define STRUCT_VALUE 0
-
 /* A C expression which can inhibit the returning of certain function
    values in registers, based on the type of value.  A nonzero value
    says to return the function value in memory, just as large
@@ -2588,11 +2579,6 @@
 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
    is done just by pretending it is already truncated.  */
 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
-
-/* When a prototype says `char' or `short', really pass an `int'.
-   (The 386 can't easily push less than an int.)  */
-
-#define PROMOTE_PROTOTYPES 1
 
 /* A macro to update M and UNSIGNEDP when an object whose type is
    TYPE and which has the specified mode and signedness is to be


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