aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-21 16:42:28 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-21 16:42:28 +0000
commitbf622d7d88f59d9f3302c0244c12094c74bd2f39 (patch)
tree93caacf2f20e43765f7c0e0c43351507383a37cd
parent1f65668d9147d842c3b333c82af957795b89732b (diff)
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49931 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/sh/elf.h2
-rw-r--r--gcc/config/sh/lib1funcs.asm2
-rw-r--r--gcc/config/sh/sh-protos.h2
-rw-r--r--gcc/config/sh/sh.c11
-rw-r--r--gcc/config/sh/sh.h15
-rw-r--r--gcc/config/sh/sh.md2
-rw-r--r--gcc/config/sh/sh64.h6
8 files changed, 34 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 23e92454e6d..14bd7a7d8fd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/sh/elf.h b/gcc/config/sh/elf.h
index 9bd5a3698aa..d5aa9471057 100644
--- a/gcc/config/sh/elf.h
+++ b/gcc/config/sh/elf.h
@@ -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>.
diff --git a/gcc/config/sh/lib1funcs.asm b/gcc/config/sh/lib1funcs.asm
index 53ca874d4c1..1f61a8dcbc4 100644
--- a/gcc/config/sh/lib1funcs.asm
+++ b/gcc/config/sh/lib1funcs.asm
@@ -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
diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h
index 59ed9e70dbb..d7a1162e46c 100644
--- a/gcc/config/sh/sh-protos.h
+++ b/gcc/config/sh/sh-protos.h
@@ -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).
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 9a2885320b5..10f342ce23f 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -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++)
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 880ab4168e1..1a486214e33 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -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) \
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 01c7aba5328..263d9bd94a9 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -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).
diff --git a/gcc/config/sh/sh64.h b/gcc/config/sh/sh64.h
index ccf7f481bf0..c23c354565f 100644
--- a/gcc/config/sh/sh64.h
+++ b/gcc/config/sh/sh64.h
@@ -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__"