diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-10-09 12:35:48 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-10-09 12:35:48 -0400 |
commit | 4859bca5c1a1a46141819f825fcb2a80a9119dbb (patch) | |
tree | e3d857a4e22969da0f86e14343e48687177e16a8 /gcc/ginclude | |
parent | fc5fbc11aaf7f9a37442fa2c14df36894d19aaba (diff) | |
download | gcc-4859bca5c1a1a46141819f825fcb2a80a9119dbb.zip gcc-4859bca5c1a1a46141819f825fcb2a80a9119dbb.tar.gz gcc-4859bca5c1a1a46141819f825fcb2a80a9119dbb.tar.bz2 |
(va_arg): Deal with long longs that would be passed in the 7th
register, and are passed in the stack instead.
From-SVN: r10436
Diffstat (limited to 'gcc/ginclude')
-rw-r--r-- | gcc/ginclude/va-ppc.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ginclude/va-ppc.h b/gcc/ginclude/va-ppc.h index 9406574..09f11e0 100644 --- a/gcc/ginclude/va-ppc.h +++ b/gcc/ginclude/va-ppc.h @@ -5,6 +5,8 @@ #ifndef __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 { char gpr; /* index into the array of 8 GPRs stored in the register save area gpr=0 corresponds to r3, @@ -115,6 +117,14 @@ __extension__ (*({ \ (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)) \ { \ __ptr = * (TYPE **) (void *) ((AP)->overflow_arg_area); \ |