Commit 341ec191 by Kazu Hirata Committed by Kazu Hirata

m68hc11.c (TARGET_STRUCT_VALUE_RTX): New.

	* config/m68hc11/m68hc11.c (TARGET_STRUCT_VALUE_RTX): New.
	(TARGET_RETURN_IN_MEMORY): Likewise.
	(m68hc11_struct_value_rtx): Likewise.
	(m68hc11_return_in_memory): Likewise.
	* config/m68hc11/m68hc11.h: Remove a commented-out definition
	of PROMOTE_PROTOTYPES.
	(RETURN_IN_MEMORY): Remove.
	(STRUCT_VALUE_REGNUM): Likewise.

From-SVN: r76571
parent 344caf1b
2004-01-25 Kazu Hirata <kazu@cs.umass.edu> 2004-01-25 Kazu Hirata <kazu@cs.umass.edu>
* config/m68hc11/m68hc11.c (TARGET_STRUCT_VALUE_RTX): New.
(TARGET_RETURN_IN_MEMORY): Likewise.
(m68hc11_struct_value_rtx): Likewise.
(m68hc11_return_in_memory): Likewise.
* config/m68hc11/m68hc11.h: Remove a commented-out definition
of PROMOTE_PROTOTYPES.
(RETURN_IN_MEMORY): Remove.
(STRUCT_VALUE_REGNUM): Likewise.
2004-01-25 Kazu Hirata <kazu@cs.umass.edu>
* config/mmix/mmix-protos.h: Remove the prototype for * config/mmix/mmix-protos.h: Remove the prototype for
mmix_setup_incoming_varargs. mmix_setup_incoming_varargs.
* config/mmix/mmix.c (TARGET_PROMOTE_FUNCTION_ARGS): New. * config/mmix/mmix.c (TARGET_PROMOTE_FUNCTION_ARGS): New.
......
/* Subroutines for code generation on Motorola 68HC11 and 68HC12. /* Subroutines for code generation on Motorola 68HC11 and 68HC12.
Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr) Contributed by Stephane Carrez (stcarrez@nerim.fr)
This file is part of GCC. This file is part of GCC.
...@@ -87,6 +87,8 @@ static unsigned int m68hc11_section_type_flags (tree, const char*, int); ...@@ -87,6 +87,8 @@ static unsigned int m68hc11_section_type_flags (tree, const char*, int);
static int autoinc_mode (rtx); static int autoinc_mode (rtx);
static int m68hc11_make_autoinc_notes (rtx *, void *); static int m68hc11_make_autoinc_notes (rtx *, void *);
static void m68hc11_init_libfuncs (void); static void m68hc11_init_libfuncs (void);
static rtx m68hc11_struct_value_rtx (tree, int);
static bool m68hc11_return_in_memory (tree, tree);
/* Must be set to 1 to produce debug messages. */ /* Must be set to 1 to produce debug messages. */
int debug_m6811 = 0; int debug_m6811 = 0;
...@@ -254,6 +256,11 @@ static int nb_soft_regs; ...@@ -254,6 +256,11 @@ static int nb_soft_regs;
#undef TARGET_INIT_LIBFUNCS #undef TARGET_INIT_LIBFUNCS
#define TARGET_INIT_LIBFUNCS m68hc11_init_libfuncs #define TARGET_INIT_LIBFUNCS m68hc11_init_libfuncs
#undef TARGET_STRUCT_VALUE_RTX
#define TARGET_STRUCT_VALUE_RTX m68hc11_struct_value_rtx
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY m68hc11_return_in_memory
struct gcc_target targetm = TARGET_INITIALIZER; struct gcc_target targetm = TARGET_INITIALIZER;
int int
...@@ -5520,4 +5527,23 @@ m68hc11_asm_out_destructor (rtx symbol, int priority) ...@@ -5520,4 +5527,23 @@ m68hc11_asm_out_destructor (rtx symbol, int priority)
fprintf (asm_out_file, "\t.globl\t__do_global_dtors\n"); fprintf (asm_out_file, "\t.globl\t__do_global_dtors\n");
} }
static rtx
m68hc11_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
int incoming ATTRIBUTE_UNUSED)
{
return gen_rtx_REG (Pmode, HARD_D_REGNUM);
}
/* Return true if type TYPE should be returned in memory.
Blocks and data types largers than 4 bytes cannot be returned
in the register (D + X = 4). */
static bool
m68hc11_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
{
return ((TYPE_MODE (type) == BLKmode)
? (int_size_in_bytes (type) > 4)
: (GET_MODE_SIZE (TYPE_MODE (type)) > 4));
}
#include "gt-m68hc11.h" #include "gt-m68hc11.h"
/* Definitions of target machine for GNU compiler. /* Definitions of target machine for GNU compiler.
Motorola 68HC11 and 68HC12. Motorola 68HC11 and 68HC12.
Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr) Contributed by Stephane Carrez (stcarrez@nerim.fr)
This file is part of GCC. This file is part of GCC.
...@@ -1004,9 +1004,6 @@ extern enum reg_class m68hc11_tmp_regs_class; ...@@ -1004,9 +1004,6 @@ extern enum reg_class m68hc11_tmp_regs_class;
/* Passing Function Arguments on the Stack. */ /* Passing Function Arguments on the Stack. */
/* When a prototype says `char' or `short', really pass an `int'. */
/* #define PROMOTE_PROTOTYPES */
/* If we generate an insn to push BYTES bytes, this says how many the /* If we generate an insn to push BYTES bytes, this says how many the
stack pointer really advances by. No rounding or alignment needed stack pointer really advances by. No rounding or alignment needed
for MC6811. */ for MC6811. */
...@@ -1021,15 +1018,6 @@ extern enum reg_class m68hc11_tmp_regs_class; ...@@ -1021,15 +1018,6 @@ extern enum reg_class m68hc11_tmp_regs_class;
args as part of the call template. */ args as part of the call template. */
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
/* Nonzero if type TYPE should be returned in memory.
Blocks and data types largers than 4 bytes cannot be returned
in the register (D + X = 4). */
#define RETURN_IN_MEMORY(TYPE) \
((TYPE_MODE (TYPE) == BLKmode) \
? (int_size_in_bytes (TYPE) > 4) \
: (GET_MODE_SIZE (TYPE_MODE (TYPE)) > 4))
/* Passing Arguments in Registers. */ /* Passing Arguments in Registers. */
/* Define a data type for recording info about an argument list /* Define a data type for recording info about an argument list
...@@ -1148,10 +1136,6 @@ typedef struct m68hc11_args ...@@ -1148,10 +1136,6 @@ typedef struct m68hc11_args
#define FUNCTION_VALUE_REGNO_P(N) \ #define FUNCTION_VALUE_REGNO_P(N) \
((N) == HARD_D_REGNUM || (N) == HARD_X_REGNUM) ((N) == HARD_D_REGNUM || (N) == HARD_X_REGNUM)
/* Register in which address to store a structure value is passed to a
function. */
#define STRUCT_VALUE_REGNUM HARD_D_REGNUM
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
the stack pointer does not matter. The value is tested only in functions the stack pointer does not matter. The value is tested only in functions
that have frame pointers. No definition is equivalent to always zero. */ that have frame pointers. No definition is equivalent to always zero. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment