This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Poison 4 target macros.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 04 Feb 2004 08:29:14 -0500 (EST)
- Subject: [patch] Poison 4 target macros.
Hi,
Attached is a patch to poison the following macros.
PROMOTE_FUNCTION_RETURN
STRUCT_VALUE_REGNUM
EXPAND_BUILTIN_SAVEREGS
SHARED_SECTION_ASM_OP
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
* system.h (PROMOTE_FUNCTION_RETURN, STRUCT_VALUE_REGNUM,
EXPAND_BUILTIN_SAVEREGS, SHARED_SECTION_ASM_OP): Poison.
* target-def.h (TARGET_PROMOTE_FUNCTION_RETURN): Define as
hook_bool_tree_false.
* targhooks.c (default_promote_function_return): Remove.
(default_struct_value_rtx): Don't use STRUCT_VALUE_REGNUM.
* targhooks.h: Remove the prototype for
default_promote_function_return.
* varasm.c (data_section): Don't use SHARED_SECTION_ASM_OP.
* doc/tm.texi (SHARED_SECTION_ASM_OP): Remove.
Index: system.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/system.h,v
retrieving revision 1.194
diff -u -r1.194 system.h
--- system.h 3 Feb 2004 22:14:47 -0000 1.194
+++ system.h 4 Feb 2004 07:09:45 -0000
@@ -603,7 +603,9 @@
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
+ STRUCT_VALUE_INCOMING STRICT_ARGUMENT_NAMING \
+ PROMOTE_FUNCTION_RETURN STRUCT_VALUE_REGNUM \
+ EXPAND_BUILTIN_SAVEREGS
/* 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
@@ -633,7 +635,7 @@
FIRST_INSN_ADDRESS TEXT_SECTION SHARED_BSS_SECTION_ASM_OP \
PROMOTED_MODE EXPAND_BUILTIN_VA_END \
LINKER_DOES_NOT_WORK_WITH_DWARF2 FUNCTION_ARG_KEEP_AS_REFERENCE \
- GIV_SORT_CRITERION
+ GIV_SORT_CRITERION SHARED_SECTION_ASM_OP
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
Index: target-def.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target-def.h,v
retrieving revision 1.66
diff -u -r1.66 target-def.h
--- target-def.h 31 Jan 2004 22:12:55 -0000 1.66
+++ target-def.h 4 Feb 2004 07:09:45 -0000
@@ -326,7 +326,7 @@
#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_FUNCTION_RETURN hook_bool_tree_false
#define TARGET_PROMOTE_PROTOTYPES default_promote_prototypes
#define TARGET_STRUCT_VALUE_RTX default_struct_value_rtx
Index: targhooks.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/targhooks.c,v
retrieving revision 2.16
diff -u -r2.16 targhooks.c
--- targhooks.c 31 Jan 2004 22:12:55 -0000 2.16
+++ targhooks.c 4 Feb 2004 07:09:45 -0000
@@ -79,16 +79,6 @@
}
bool
-default_promote_function_return (tree fntype ATTRIBUTE_UNUSED)
-{
-#ifdef PROMOTE_FUNCTION_RETURN
- return true;
-#else
- return false;
-#endif
-}
-
-bool
default_promote_prototypes (tree fntype ATTRIBUTE_UNUSED)
{
if (PROMOTE_PROTOTYPES)
@@ -104,12 +94,8 @@
#ifdef STRUCT_VALUE
return STRUCT_VALUE;
#else
-#ifdef STRUCT_VALUE_REGNUM
- return gen_rtx_REG (Pmode, STRUCT_VALUE_REGNUM);
-#else
abort ();
#endif
-#endif
}
bool
@@ -126,12 +112,8 @@
rtx
default_expand_builtin_saveregs (void)
{
-#ifdef EXPAND_BUILTIN_SAVEREGS
- return EXPAND_BUILTIN_SAVEREGS ();
-#else
error ("__builtin_saveregs not supported by this target");
return const0_rtx;
-#endif
}
void
Index: targhooks.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/targhooks.h,v
retrieving revision 2.8
diff -u -r2.8 targhooks.h
--- targhooks.h 31 Jan 2004 22:12:55 -0000 2.8
+++ targhooks.h 4 Feb 2004 07:09:45 -0000
@@ -23,7 +23,6 @@
extern enum machine_mode default_cc_modes_compatible (enum machine_mode,
enum machine_mode);
-extern bool default_promote_function_return (tree);
extern bool default_promote_prototypes (tree);
extern rtx default_struct_value_rtx (tree, int);
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.410
diff -u -r1.410 varasm.c
--- varasm.c 3 Feb 2004 21:24:39 -0000 1.410
+++ varasm.c 4 Feb 2004 07:09:48 -0000
@@ -210,16 +210,7 @@
if (in_section != in_data)
{
in_section = in_data;
- if (flag_shared_data)
- {
-#ifdef SHARED_SECTION_ASM_OP
- fprintf (asm_out_file, "%s\n", SHARED_SECTION_ASM_OP);
-#else
- fprintf (asm_out_file, "%s\n", DATA_SECTION_ASM_OP);
-#endif
- }
- else
- fprintf (asm_out_file, "%s\n", DATA_SECTION_ASM_OP);
+ fprintf (asm_out_file, "%s\n", DATA_SECTION_ASM_OP);
}
}
Index: doc/tm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.292
diff -u -r1.292 tm.texi
--- doc/tm.texi 4 Feb 2004 06:32:51 -0000 1.292
+++ doc/tm.texi 4 Feb 2004 07:09:56 -0000
@@ -5818,12 +5818,6 @@
in the text section.
@end defmac
-@defmac SHARED_SECTION_ASM_OP
-If defined, a C expression whose value is a string, including spacing,
-containing the assembler operation to identify the following data as
-shared data. If not defined, @code{DATA_SECTION_ASM_OP} will be used.
-@end defmac
-
@defmac BSS_SECTION_ASM_OP
If defined, a C expression whose value is a string, including spacing,
containing the assembler operation to identify the following data as