mn10300_builtin_saveregs.
* config/mn10300/mn10300.c (TARGET_PROMOTE_PROTOTYPES): New.
(TARGET_STRUCT_VALUE_RTX): Likewise.
(TARGET_RETURN_IN_MEMORY): Likewise.
(TARGET_EXPAND_BUILTIN_SAVEREGS): Likewise.
(mn10300_return_in_memory): Likewise.
(mn10300_builtin_saveregs): Make it static.
* config/mn10300/mn10300.h (PROMOTE_PROTOTYPES): Remove.
(RETURN_IN_MEMORY): Likewise.
(STRUCT_VALUE): Likewise.
(EXPAND_BUILTIN_SAVEREGS): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76581
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-01-25 Kazu Hirata <kazu@cs.umass.edu>
+
+ * config/mn10300/mn10300-protos.h: Remove the prototype for
+ mn10300_builtin_saveregs.
+ * config/mn10300/mn10300.c (TARGET_PROMOTE_PROTOTYPES): New.
+ (TARGET_STRUCT_VALUE_RTX): Likewise.
+ (TARGET_RETURN_IN_MEMORY): Likewise.
+ (TARGET_EXPAND_BUILTIN_SAVEREGS): Likewise.
+ (mn10300_return_in_memory): Likewise.
+ (mn10300_builtin_saveregs): Make it static.
+ * config/mn10300/mn10300.h (PROMOTE_PROTOTYPES): Remove.
+ (RETURN_IN_MEMORY): Likewise.
+ (STRUCT_VALUE): Likewise.
+ (EXPAND_BUILTIN_SAVEREGS): Likewise.
+
2004-01-25 Eric Botcazou <ebotcazou@act-europe.fr>
PR bootstrap/13853
/* Definitions of target machine for GNU compiler. Matsushita MN10300 series
- Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
This file is part of GCC.
extern struct rtx_def *mn10300_va_arg (tree, tree);
#endif /* TREE_CODE */
-extern struct rtx_def *mn10300_builtin_saveregs (void);
extern void expand_prologue (void);
extern void expand_epilogue (void);
extern int initial_offset (int, int);
/* Subroutines for insn-output.c for Matsushita MN10300 series
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
static int mn10300_address_cost (rtx);
static bool mn10300_rtx_costs (rtx, int, int, int *);
static void mn10300_file_start (void);
+static bool mn10300_return_in_memory (tree, tree);
+static rtx mn10300_builtin_saveregs (void);
\f
/* Initialize the GCC target structure. */
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO mn10300_encode_section_info
+#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
+#undef TARGET_RETURN_IN_MEMORY
+#define TARGET_RETURN_IN_MEMORY mn10300_return_in_memory
+
+#undef TARGET_EXPAND_BUILTIN_SAVEREGS
+#define TARGET_EXPAND_BUILTIN_SAVEREGS mn10300_builtin_saveregs
+
static void mn10300_encode_section_info (tree, rtx, int);
struct gcc_target targetm = TARGET_INITIALIZER;
\f
abort ();
}
+static bool
+mn10300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+{
+ /* Return values > 8 bytes in length in memory. */
+ return int_size_in_bytes (type) > 8 || TYPE_MODE (type) == BLKmode;
+}
+
/* Flush the argument registers to the stack for a stdarg function;
return the new argument pointer. */
-rtx
+static rtx
mn10300_builtin_saveregs (void)
{
rtx offset, mem;
/* Definitions of target machine for GNU compiler.
Matsushita MN10300 series
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
#define FRAME_POINTER_REQUIRED 0
#define CAN_DEBUG_WITHOUT_FP
-/* A guess for the MN10300. */
-#define PROMOTE_PROTOTYPES 1
-
/* Value is the number of bytes of arguments automatically
popped when returning from a subroutine call.
FUNDECL is the declaration node of the function (as a tree),
#define FUNCTION_VALUE_REGNO_P(N) \
((N) == FIRST_DATA_REGNUM || (N) == FIRST_ADDRESS_REGNUM)
-/* Return values > 8 bytes in length in memory. */
#define DEFAULT_PCC_STRUCT_RETURN 0
-#define RETURN_IN_MEMORY(TYPE) \
- (int_size_in_bytes (TYPE) > 8 || TYPE_MODE (TYPE) == BLKmode)
-
-/* Register in which address to store a structure value
- is passed to a function. On the MN10300 it's passed as
- the first parameter. */
-
-#define STRUCT_VALUE 0
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
the stack pointer does not matter. The value is tested only in
? gen_rtx_MEM (Pmode, arg_pointer_rtx) \
: (rtx) 0)
-/* Emit code for a call to builtin_saveregs. We must emit USE insns which
- reference the 2 integer arg registers.
- Ordinarily they are not call used registers, but they are for
- _builtin_saveregs, so we must make this explicit. */
-
-#define EXPAND_BUILTIN_SAVEREGS() mn10300_builtin_saveregs ()
-
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
mn10300_va_start (valist, nextarg)