summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog23
-rw-r--r--gcc/defaults.h5
-rw-r--r--gcc/system.h4
-rw-r--r--gcc/target-def.h4
-rw-r--r--gcc/target.h3
-rw-r--r--gcc/targhooks.c38
-rw-r--r--gcc/targhooks.h3
7 files changed, 30 insertions, 50 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fe519e52986..f16ed133a31 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,28 @@
2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
+ * default.h (PROMOTE_PROTOTYPES): Remove.
+ * system.h (PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES,
+ STRUCT_VALUE_REGNUM, SETUP_INCOMING_VARARGS,
+ EXPAND_BUILTIN_SAVEREGS): Poison.
+ * target-def.h (TARGET_PROMOTE_FUNCTION_RETURN): Define as
+ hook_bool_tree_false.
+ (TARGET_PROMOTE_PROTOTYPES): Likewise.
+ * target.h: Replace SETUP_INCOMING_VARARGS with
+ targetm.calls.setup_incoming_varargs().
+ * targhooks.c (default_promote_function_return): Remove.
+ (default_promote_prototypes): Likewise.
+ (default_struct_value_rtx): Always abort().
+ (default_expand_builtin_saveregs): Always print an error
+ message.
+ (default_setup_incoming_varargs): Do nothing.
+ (default_pretend_outgoing_varargs_named): Don't depend on
+ SETUP_INCOMING_VARARGS.
+ * targhooks.h: Remove the prototype for
+ default_promote_function_return and
+ default_promote_prototypes.
+
+2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
+
* system.h (SHARED_SECTION_ASM_OP): Poison.
* varasm.c (data_section): Don't use SHARED_SECTION_ASM_OP.
* doc/tm.texi (SHARED_SECTION_ASM_OP): Remove.
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 2f1c700d646..57e53f4e6ca 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -305,11 +305,6 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
#define DWARF2_GENERATE_TEXT_SECTION_LABEL 1
#endif
-/* Supply a default definition for PROMOTE_PROTOTYPES. */
-#ifndef PROMOTE_PROTOTYPES
-#define PROMOTE_PROTOTYPES 0
-#endif
-
/* Number of hardware registers that go into the DWARF-2 unwind info.
If not defined, equals FIRST_PSEUDO_REGISTER */
diff --git a/gcc/system.h b/gcc/system.h
index 12c48bd5fdd..31a1b92357f 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -603,7 +603,9 @@ typedef char _Bool;
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 PROMOTE_PROTOTYPES STRUCT_VALUE_REGNUM \
+ SETUP_INCOMING_VARARGS 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
diff --git a/gcc/target-def.h b/gcc/target-def.h
index 8a757acb2bf..54a47721c9d 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -326,8 +326,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#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
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_false
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false
#define TARGET_STRUCT_VALUE_RTX default_struct_value_rtx
#define TARGET_RETURN_IN_MEMORY default_return_in_memory
diff --git a/gcc/target.h b/gcc/target.h
index 21a12f0ec3a..aa56d64f572 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -449,7 +449,8 @@ struct gcc_target
void (*setup_incoming_varargs) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
tree type, int *pretend_arg_size, int second_time);
bool (*strict_argument_naming) (CUMULATIVE_ARGS *ca);
- /* Returns true if we should use SETUP_INCOMING_VARARGS and/or
+ /* Returns true if we should use
+ targetm.calls.setup_incoming_varargs() and/or
targetm.calls.strict_argument_naming(). */
bool (*pretend_outgoing_varargs_named) (CUMULATIVE_ARGS *ca);
} calls;
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index ed382e95449..ce491b28339 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -78,38 +78,11 @@ default_cc_modes_compatible (enum machine_mode m1, enum machine_mode m2)
return VOIDmode;
}
-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)
- return true;
- else
- return false;
-}
-
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
@@ -126,12 +99,8 @@ default_return_in_memory (tree type,
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
@@ -141,9 +110,6 @@ default_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
int *pretend_arg_size ATTRIBUTE_UNUSED,
int second_time ATTRIBUTE_UNUSED)
{
-#ifdef SETUP_INCOMING_VARARGS
- SETUP_INCOMING_VARARGS ((*ca), mode, type, (*pretend_arg_size), second_time);
-#endif
}
/* Generic hook that takes a CUMULATIVE_ARGS pointer and returns true. */
@@ -157,11 +123,7 @@ hook_bool_CUMULATIVE_ARGS_false (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
bool
default_pretend_outgoing_varargs_named(CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
{
-#ifdef SETUP_INCOMING_VARARGS
- return 1;
-#else
return (targetm.calls.setup_incoming_varargs != default_setup_incoming_varargs);
-#endif
}
/* Generic hook that takes a CUMULATIVE_ARGS pointer and returns true. */
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index 56fb45ff446..2de18e75bb6 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -23,9 +23,6 @@ extern void default_external_libcall (rtx);
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);
extern bool default_return_in_memory (tree, tree);