Commit 8636be86 by Kazu Hirata Committed by Kazu Hirata

m68k.c (TARGET_PROMOTE_PROTOTYPES): New.

	* config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES): New.
	(TARGET_STRUCT_VALUE_RTX): Likewise.
	(m68k_struct_value_rtx): Likewise.
	* config/m68k/m68k.h (STRUCT_VALUE_REGNUM): Rename to
	STRUCT_VALUE_REGNUM.
	(PROMOTE_PROTOTYPES): Remove.
	* config/m68k/m68kelf.h (STRUCT_VALUE_REGNUM): Rename to
	STRUCT_VALUE_REGNUM.
	* config/m68k/m68kv4.h (STRUCT_VALUE_REGNUM): Likewise.
	* config/m68k/netbsd-elf.h (STRUCT_VALUE_REGNUM): Likewise.

From-SVN: r76833
parent f2f61ee7
2004-01-28 Kazu Hirata <kazu@cs.umass.edu>
* config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES): New.
(TARGET_STRUCT_VALUE_RTX): Likewise.
(m68k_struct_value_rtx): Likewise.
* config/m68k/m68k.h (STRUCT_VALUE_REGNUM): Rename to
STRUCT_VALUE_REGNUM.
(PROMOTE_PROTOTYPES): Remove.
* config/m68k/m68kelf.h (STRUCT_VALUE_REGNUM): Rename to
STRUCT_VALUE_REGNUM.
* config/m68k/m68kv4.h (STRUCT_VALUE_REGNUM): Likewise.
* config/m68k/netbsd-elf.h (STRUCT_VALUE_REGNUM): Likewise.
2004-01-28 Kazu Hirata <kazu@cs.umass.edu>
* config/stormy16/stormy16.c
(TARGET_BUILD_BUILTIN_VA_LIST_TYPE): Rename to
TARGET_BUILD_BUILTIN_VA_LIST.
......
/* Subroutines for insn-output.c for Motorola 68000 family.
Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -107,6 +108,7 @@ static void m68k_hp320_file_start (void);
#endif
static void m68k_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
static rtx m68k_struct_value_rtx (tree, int);
static bool m68k_interrupt_function_p (tree func);
static tree m68k_handle_fndecl_attribute (tree *node, tree name,
tree args, int flags,
......@@ -192,6 +194,12 @@ int m68k_last_compare_had_fp_operands;
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE m68k_attribute_table
#undef TARGET_PROMOTE_PROTOTYPES
#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
#undef TARGET_STRUCT_VALUE_RTX
#define TARGET_STRUCT_VALUE_RTX m68k_struct_value_rtx
static const struct attribute_spec m68k_attribute_table[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
......@@ -3496,3 +3504,12 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
output_asm_insn (fmt, xops);
}
/* Worker function for TARGET_STRUCT_VALUE_RTX. */
static rtx
m68k_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
int incoming ATTRIBUTE_UNUSED)
{
return gen_rtx_REG (Pmode, M68K_STRUCT_VALUE_REGNUM);
}
/* Definitions of target machine for GNU compiler.
Sun 68000/68020 version.
Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -587,7 +587,7 @@ extern int target_flags;
/* Register in which address to store a structure value
is passed to a function. */
#define STRUCT_VALUE_REGNUM 9
#define M68K_STRUCT_VALUE_REGNUM 9
/* Define the classes of registers for register constraints in the
machine description. Also define ranges of constants.
......@@ -1369,9 +1369,6 @@ __transfer_from_trampoline () \
#define STORE_FLAG_VALUE (-1)
/* When a prototype says `char' or `short', really pass an `int'. */
#define PROMOTE_PROTOTYPES 1
/* Specify the machine mode that pointers have.
After generation of rtl, the compiler makes no further distinction
between pointers and any other objects of this machine mode. */
......
/* m68kelf support, derived from m68kv4.h */
/* Target definitions for GNU compiler for mc680x0 running System V.4
Copyright (C) 1991, 1993, 2000, 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 1991, 1993, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Ron Guilmette (rfg@netcom.com) and Fred Fish (fnf@cygnus.com).
......@@ -137,8 +138,8 @@ do { \
/* Register in which address to store a structure value is passed to a
function. The default in m68k.h is a1. For m68k/SVR4 it is a0. */
#undef STRUCT_VALUE_REGNUM
#define STRUCT_VALUE_REGNUM 8
#undef M68K_STRUCT_VALUE_REGNUM
#define M68K_STRUCT_VALUE_REGNUM 8
#define ASM_COMMENT_START "|"
......
/* Target definitions for GNU compiler for mc680x0 running System V.4
Copyright (C) 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2003
Copyright (C) 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2003, 2004
Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com) and
Fred Fish (fnf@cygnus.com).
......@@ -90,8 +90,8 @@ Boston, MA 02111-1307, USA. */
/* Register in which address to store a structure value is passed to a
function. The default in m68k.h is a1. For m68k/SVR4 it is a0. */
#undef STRUCT_VALUE_REGNUM
#define STRUCT_VALUE_REGNUM 8
#undef M68K_STRUCT_VALUE_REGNUM
#define M68K_STRUCT_VALUE_REGNUM 8
/* Register in which static-chain is passed to a function. The
default in m68k.h is a0, but that is already the struct value
......
/* Definitions of target machine for GNU compiler,
for m68k (including m68010) NetBSD platforms using the
ELF object format.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Wasabi Systems. Inc.
This file is derived from <m68k/m68kv4.h>, <m68k/m68kelf.h>,
......@@ -273,8 +273,8 @@ while (0)
/* Register in which address to store a structure value is passed to a
function. The default in m68k.h is a1. For m68k/SVR4 it is a0. */
#undef STRUCT_VALUE_REGNUM
#define STRUCT_VALUE_REGNUM 8
#undef M68K_STRUCT_VALUE_REGNUM
#define M68K_STRUCT_VALUE_REGNUM 8
/* Register in which static-chain is passed to a function. The
......
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