mips-protos.h: Remove the prototypes for mips_setup_incoming_varargs and mips_return_in_memory.

* config/mips/mips-protos.h: Remove the prototypes for
	mips_setup_incoming_varargs and mips_return_in_memory.
	* config/mips/mips.c (TARGET_PROMOTE_FUNCTION_ARGS): New.
	(TARGET_PROMOTE_FUNCTION_RETURN): Likewise.
	(TARGET_PROMOTE_PROTOTYPES): Likewise.
	(TARGET_STRUCT_VALUE_RTX): Likewise.
	(TARGET_RETURN_IN_MEMORY): Likewise.
	(TARGET_SETUP_INCOMING_VARARGS): Likewise.
	(TARGET_STRICT_ARGUMENT_NAMING): Likewise.
	(mips_setup_incoming_varargs): Match the prototype for
	TARGET_SETUP_INCOMING_VARARGS.
	(mips_return_in_memory): Make it static.  Add argument fntype.
	(mips_strict_argument_naming): New.
	* config/mips/mips.h (PROMOTE_PROTOTYPES): Remove.
	(PROMOTE_FUNCTION_ARGS): Likewise.
	(PROMOTE_FUNCTION_RETURN): Likewise.
	(STRUCT_VALUE): Likewise.
	(RETURN_IN_MEMORY): Likewise.
	(SETUP_INCOMING_VARARGS): Likewise.
	(STRICT_ARGUMENT_NAMING): Likewise.

From-SVN: r76569
This commit is contained in:
Kazu Hirata 2004-01-25 17:28:19 +00:00
parent 0c8da56022
commit a9ba509849
3 changed files with 34 additions and 26 deletions

View File

@ -1,5 +1,5 @@
/* Prototypes for exported functions defined in mmix.c
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of GCC.
@ -60,8 +60,6 @@ extern int mmix_function_value_regno_p (int);
extern int mmix_data_alignment (tree, int);
extern int mmix_constant_alignment (tree, int);
extern int mmix_local_alignment (tree, int);
extern void mmix_setup_incoming_varargs
(CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
extern void mmix_asm_output_pool_prologue (FILE *, const char *, tree, int);
extern void mmix_asm_output_aligned_common (FILE *, const char *, int, int);
extern void mmix_asm_output_aligned_local (FILE *, const char *, int, int);

View File

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for MMIX.
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of GCC.
@ -133,9 +133,12 @@ static void mmix_target_asm_function_epilogue (FILE *, HOST_WIDE_INT);
static void mmix_reorg (void);
static void mmix_asm_output_mi_thunk
(FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree);
static void mmix_setup_incoming_varargs
(CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
static void mmix_file_start (void);
static void mmix_file_end (void);
static bool mmix_rtx_costs (rtx, int, int, int *);
static rtx mmix_struct_value_rtx (tree, int);
/* Target structure macros. Listed by node. See `Using and Porting GCC'
@ -187,6 +190,21 @@ static bool mmix_rtx_costs (rtx, int, int, int *);
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG mmix_reorg
#undef TARGET_PROMOTE_FUNCTION_ARGS
#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
#if 0
/* Apparently not doing TRT if int < register-size. FIXME: Perhaps
FUNCTION_VALUE and LIBCALL_VALUE needs tweaking as some ports say. */
#undef TARGET_PROMOTE_FUNCTION_RETURN
#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
#endif
#undef TARGET_STRUCT_VALUE_RTX
#define TARGET_STRUCT_VALUE_RTX mmix_struct_value_rtx
#undef TARGET_SETUP_INCOMING_VARARGS
#define TARGET_SETUP_INCOMING_VARARGS mmix_setup_incoming_varargs
struct gcc_target targetm = TARGET_INITIALIZER;
/* Functions that are expansions for target macros.
@ -803,9 +821,11 @@ mmix_function_profiler (FILE *stream ATTRIBUTE_UNUSED,
sorry ("function_profiler support for MMIX");
}
/* SETUP_INCOMING_VARARGS. */
/* Worker function for TARGET_SETUP_INCOMING_VARARGS. For the moment,
let's stick to pushing argument registers on the stack. Later, we
can parse all arguments in registers, to improve performance. */
void
static void
mmix_setup_incoming_varargs (CUMULATIVE_ARGS *args_so_farp,
enum machine_mode mode,
tree vartype,
@ -2938,6 +2958,15 @@ mmix_intval (rtx x)
fatal_insn ("MMIX Internal: This is not a constant:", x);
}
/* Worker function for TARGET_STRUCT_VALUE_RTX. */
static rtx
mmix_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
int incoming ATTRIBUTE_UNUSED)
{
return gen_rtx_REG (Pmode, MMIX_STRUCT_VALUE_REGNUM);
}
/*
* Local variables:
* eval: (c-set-style "gnu")

View File

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for MMIX.
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of GCC.
@ -293,14 +293,6 @@ extern int target_flags;
} \
} while (0)
#define PROMOTE_FUNCTION_ARGS
#if 0
/* Apparently not doing TRT if int < register-size. FIXME: Perhaps
FUNCTION_VALUE and LIBCALL_VALUE needs tweaking as some ports say. */
#define PROMOTE_FUNCTION_RETURN
#endif
/* I'm a little bit undecided about this one. It might be beneficial to
promote all operations. */
#define PROMOTE_FOR_CALL_ONLY
@ -779,11 +771,6 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
mmix_function_value_regno_p (REGNO)
/* Node: Aggregate Return */
#define STRUCT_VALUE_REGNUM MMIX_STRUCT_VALUE_REGNUM
/* Node: Caller Saves */
/* (empty) */
@ -806,12 +793,6 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
/* Node: Varargs */
/* For the moment, let's stick to pushing argument registers on the stack.
Later, we can parse all arguments in registers, to improve
performance. */
#define SETUP_INCOMING_VARARGS(A, M, T, P, S) \
mmix_setup_incoming_varargs(&(A), M, T, &(P), S)
/* FIXME: This and other EXPAND_BUILTIN_VA_... target macros are not
documented, although used by several targets. */
#define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE) \