]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(va_arg): For little endian, eabi, objects
authorGavin Romig-Koch <gavin@gcc.gnu.org>
Mon, 24 Mar 1997 19:22:33 +0000 (19:22 +0000)
committerGavin Romig-Koch <gavin@gcc.gnu.org>
Mon, 24 Mar 1997 19:22:33 +0000 (19:22 +0000)
less than __va_reg_size are passed in registers.

From-SVN: r13760

gcc/ginclude/va-mips.h

index 793d31d8faeac8cff33391a9893a4e326fb01def..af1e1f461b6c64adc402df7bbc147c97c1a40b97 100644 (file)
@@ -219,9 +219,11 @@ void va_end (__gnuc_va_list);              /* Defined in libgcc.a */
       : *(__type *) (void *) __va_next_addr (__AP, __type)))
 #else
 #define va_arg(__AP, __type)                                           \
-  (__builtin_classify_type (* (__type *) 0) >= __record_type_class     \
-   ? **(__type **) (void *) __va_next_addr (__AP, __type)              \
-   : *(__type *) (void *) __va_next_addr (__AP, __type))
+  ((__va_rounded_size (__type) <= __va_reg_size)                       \
+   ? *(__type *) (void *) __va_next_addr (__AP, __type)                \
+   : (__builtin_classify_type (* (__type *) 0) >= __record_type_class  \
+      ? **(__type **) (void *) __va_next_addr (__AP, __type)           \
+      : *(__type *) (void *) __va_next_addr (__AP, __type)))
 #endif
 
 #else /* ! defined (__mips_eabi) */