Commit 4859bca5 by Richard Kenner

(va_arg): Deal with long longs that would be passed in the 7th

register, and are passed in the stack instead.

From-SVN: r10436
parent fc5fbc11
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef __GNUC_VA_LIST #ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST #define __GNUC_VA_LIST
/* Note that the names in this structure are in the user's namespace, but
that the V.4 abi explicitly states that these names should be used. */
typedef struct { typedef struct {
char gpr; /* index into the array of 8 GPRs stored in the char gpr; /* index into the array of 8 GPRs stored in the
register save area gpr=0 corresponds to r3, register save area gpr=0 corresponds to r3,
...@@ -115,6 +117,14 @@ __extension__ (*({ \ ...@@ -115,6 +117,14 @@ __extension__ (*({ \
(AP)->gpr += __va_size (TYPE); \ (AP)->gpr += __va_size (TYPE); \
} \ } \
\ \
else if (!__va_float_p (TYPE) && !__va_aggregate_p (TYPE) \
&& (AP)->gpr < 8) \
{ \
(AP)->gpr = 8; \
__ptr = (TYPE *) (void *) ((AP)->overflow_arg_area); \
(AP)->overflow_arg_area += __va_size (TYPE) * sizeof (long); \
} \
\
else if (__va_aggregate_p (TYPE)) \ else if (__va_aggregate_p (TYPE)) \
{ \ { \
__ptr = * (TYPE **) (void *) ((AP)->overflow_arg_area); \ __ptr = * (TYPE **) (void *) ((AP)->overflow_arg_area); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment