OSDN Git Service

*** empty log message ***
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jan 1992 20:37:09 +0000 (20:37 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jan 1992 20:37:09 +0000 (20:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ginclude/stdarg.h
gcc/ginclude/va-mips.h

index 00e714a..e670fe1 100644 (file)
 #ifdef __i860__
 #include "va-i860.h"
 #else
+#ifdef __hp9000s800__
+#include "va-hp800.h"
+#else
+#ifdef __mips__
+#include "va-mips.h"
+#else
 
 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.  */
 #ifndef _VA_LIST_
@@ -45,6 +51,8 @@ void va_end (va_list);                /* Defined in libgcc.a */
  (AP += __va_rounded_size (TYPE),                                      \
   *((TYPE *) (AP - __va_rounded_size (TYPE))))
 
+#endif /* not mips */
+#endif /* not hp9000s800 */
 #endif /* not i860 */
 #endif /* not m88k */
 #endif /* _STDARG_H */
index 24fa9ba..ffa03fb 100644 (file)
 typedef char * __va___list;
 #endif
 
+#define __va_rounded_size(TYPE)  \
+  (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
+
+#ifdef _STDARG_H
+#define va_start(AP, LASTARG)                                          \
+ (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG)))
+#else
 #define va_start(AP)  AP = (char *) &__builtin_va_alist
+#endif
+
 #define va_end(AP)
 
 #ifdef lint    /* complains about constant in conditional context */
 #define va_arg(list, mode) ((mode *)(list += sizeof(mode)))[-1]
 
 #else          /* !lint */
-#define va_arg(AP, mode) ((mode *)(AP = \
-       (char *) (sizeof(mode) > 4 ? ((int)AP + 2*8 - 1) & -8 \
-                                  : ((int)AP + 2*4 - 1) & -4)))[-1]
+#define va_arg(AP, mode)                                               \
+  ((mode *)(AP = (char *) (__alignof(mode) > 4                         \
+                               ? ((int)AP + 2*8 - 1) & -8              \
+                               : ((int)AP + 2*4 - 1) & -4)))[-1]
 #endif         /* lint */