sh.h (current_function_anonymous_args): Remove.

* sh.h (current_function_anonymous_args): Remove.
	(SETUP_INCOMING_VARARGS): Don't set it - just check that one
	of current_function_varargs and current_function_stdarg is set.
	* sh.c (sh_expand_prologue): Check current_function_varargs /
	current_function_stdarg / TARGET_SH5 instead of
	current_function_anonymous_args.

	* sh64.h (TARGET_VERSION): Define.

Fix comments that to refer to SH architecture -
the architecture is no longer exclusive to Hitachi.

From-SVN: r49931
This commit is contained in:
J"orn Rennecke 2002-02-21 16:42:28 +00:00 committed by Joern Rennecke
parent 7384051993
commit 7ab562744f
8 changed files with 34 additions and 17 deletions

View File

@ -1,3 +1,14 @@
Thu Feb 21 15:35:46 2002 J"orn Rennecke <joern.rennecke@superh.com>
* sh.h (current_function_anonymous_args): Remove.
(SETUP_INCOMING_VARARGS): Don't set it - just check that one
of current_function_varargs and current_function_stdarg is set.
* sh.c (sh_expand_prologue): Check current_function_varargs /
current_function_stdarg / TARGET_SH5 instead of
current_function_anonymous_args.
* sh64.h (TARGET_VERSION): Define.
2002-02-20 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.h (EPILOGUE_USES): Conditionalize

View File

@ -1,4 +1,4 @@
/* Definitions of target machine for gcc for Hitachi Super-H using ELF.
/* Definitions of target machine for gcc for Hitachi / SuperH SH using ELF.
Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor <ian@cygnus.com>.

View File

@ -25,7 +25,7 @@ along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
!! libgcc routines for the Hitachi SH cpu.
!! libgcc routines for the Hitachi / SuperH SH CPUs.
!! Contributed by Steve Chamberlain.
!! sac@cygnus.com

View File

@ -1,4 +1,4 @@
/* Definitions of target machine for GNU compiler for Hitachi Super-H.
/* Definitions of target machine for GNU compiler for Hitachi / SuperH SH
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com).

View File

@ -1,4 +1,4 @@
/* Output routines for GCC for Hitachi Super-H.
/* Output routines for GCC for Hitachi / SuperH SH.
Copyright (C) 1993, 1994, 1995, 1997, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com).
@ -4503,14 +4503,11 @@ sh_expand_prologue ()
}
}
/* This is set by SETUP_VARARGS to indicate that this is a varargs
routine. Clear it here so that the next function isn't affected. */
if (current_function_anonymous_args)
/* Emit the code for SETUP_VARARGS. */
if (current_function_varargs || current_function_stdarg)
{
current_function_anonymous_args = 0;
/* This is not used by the SH3E calling convention */
if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_HITACHI)
if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI)
{
/* Push arg regs as if they'd been provided by caller in stack. */
for (i = 0; i < NPARM_REGS(SImode); i++)

View File

@ -1,4 +1,4 @@
/* Definitions of target machine for GNU compiler for Hitachi Super-H.
/* Definitions of target machine for GNU compiler for Hitachi / SuperH SH.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com).
@ -1938,13 +1938,18 @@ struct sh_args {
&& ((CUM).arg_count[(int) SH_ARG_INT] \
+ (int_size_in_bytes (TYPE) + 7) / 8) > NPARM_REGS (SImode))
extern int current_function_anonymous_args;
/* Perform any needed actions needed for a function that is receiving a
variable number of arguments. */
#define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) \
current_function_anonymous_args = ! TARGET_SH5
/* We actually emit the code in sh_expand_prologue. We used to use
a static variable to flag that we need to emit this code, but that
doesn't when inlining, when functions are deferred and then emitted
later. Fortunately, we already have two flags that are part of struct
function that tell if a function uses varargs or stdarg. */
#define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) do \
if (! current_function_varargs && ! current_function_stdarg) \
abort (); \
while (0)
/* Define the `__builtin_va_list' type for the ABI. */
#define BUILD_VA_LIST_TYPE(VALIST) \

View File

@ -1,4 +1,4 @@
;;- Machine description for the Hitachi SH.
;;- Machine description for Hitachi / SuperH SH.
;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
;; Free Software Foundation, Inc.
;; Contributed by Steve Chamberlain (sac@cygnus.com).

View File

@ -1,4 +1,4 @@
/* Definitions of target machine for GNU compiler for Hitachi Super-H 5.
/* Definitions of target machine for GNU compiler for SuperH SH 5.
Copyright 2000, 2001 Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com>
@ -19,6 +19,10 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION \
fputs (" (SuperH SH)", stderr);
#undef CPP_DEFAULT_CPU_SPEC
#define CPP_DEFAULT_CPU_SPEC "-D__SH5__=32 -D__SHMEDIA__"