sh.h (current_function_anonymous_args): Remove.
authorJ"orn Rennecke <joern.rennecke@superh.com>
Thu, 21 Feb 2002 16:42:28 +0000 (16:42 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 21 Feb 2002 16:42:28 +0000 (16:42 +0000)
* 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

gcc/ChangeLog
gcc/config/sh/elf.h
gcc/config/sh/lib1funcs.asm
gcc/config/sh/sh-protos.h
gcc/config/sh/sh.c
gcc/config/sh/sh.h
gcc/config/sh/sh.md
gcc/config/sh/sh64.h

index 23e92454e6d8a165e5b89e7380e0f3a86bd82683..14bd7a7d8fd709171e36fc2b9c84796b40a5e2f4 100644 (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
index 9bd5a3698aa2a7a5dba0449bf580a44396064134..d5aa9471057cdc35308a76f1fea321876f02ddcd 100644 (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>.
 
index 53ca874d4c17bf845c286812c929c7c53dea58fb..1f61a8dcbc40481f3df31dca25600893bc3192a8 100644 (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
 
index 59ed9e70dbb7b85e335262fa5750bf7d5da8f712..d7a1162e46c879d6bcae0b8c389b51e13636d8fc 100644 (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).
index 9a2885320b568759802c442d1f930a9a0b78adf9..10f342ce23fa235d4ec300b855c4334e02b7f7bc 100644 (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++)
index 880ab4168e17232a78ad17ae471ada5366218372..1a486214e333b94b1d636a010ab598a55a772e29 100644 (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) \
index 01c7aba53280567914e478a45576f879b196087c..263d9bd94a94db13c77a0b4bc3a12e31b3366db6 100644 (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).
index ccf7f481bf00efe984b028da379e23a3e50fa157..c23c354565f33901c8a04b7f25c556797a82c9de 100644 (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__"