diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-21 19:14:28 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-21 19:14:28 +0000 |
commit | ddac7e16fa4b446a62e39f995a0485d336219c97 (patch) | |
tree | 3f27bf1a39a610820cbf8a4e771fe08062ffeb44 /libffi | |
parent | bf622d7d88f59d9f3302c0244c12094c74bd2f39 (diff) | |
download | gcc-ddac7e16fa4b446a62e39f995a0485d336219c97.tar.gz |
2002-02-21 Andreas Tobler <toa@pop.agri.ch>
* src/powerpc/ffi_darwin.c (ffi_prep_args): Skip appropriate
number of GPRs for floating-point arguments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49934 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r-- | libffi/ChangeLog | 5 | ||||
-rw-r--r-- | libffi/src/powerpc/ffi_darwin.c | 20 |
2 files changed, 19 insertions, 6 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 2c59c6a3e43..f98ef9f9924 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,8 @@ +2002-02-21 Andreas Tobler <toa@pop.agri.ch> + + * src/powerpc/ffi_darwin.c (ffi_prep_args): Skip appropriate + number of GPRs for floating-point arguments. + 2002-01-31 Anthony Green <green@redhat.com> * configure: Rebuilt. diff --git a/libffi/src/powerpc/ffi_darwin.c b/libffi/src/powerpc/ffi_darwin.c index d4a986dbbd3..3cf504cf150 100644 --- a/libffi/src/powerpc/ffi_darwin.c +++ b/libffi/src/powerpc/ffi_darwin.c @@ -6,7 +6,7 @@ Darwin ABI support (c) 2001 John Hornkvist AIX ABI support (c) 2002 Free Software Foundation, Inc. - $Id: ffi_darwin.c,v 1.1 2002/01/16 05:32:15 bryce Exp $ + $Id: ffi_darwin.c,v 1.2 2002/01/17 16:04:21 dje Exp $ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -121,13 +121,21 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack) { switch ((*ptr)->type) { + /* If a floating-point parameter appears before all of the general- + purpose registers are filled, the corresponding GPRs that match + the size of the floating-point parameter are skipped. */ case FFI_TYPE_FLOAT: - case FFI_TYPE_DOUBLE: - if ((*ptr)->type == FFI_TYPE_FLOAT) - double_tmp = *(float *)*p_argv; + double_tmp = *(float *)*p_argv; + if (fparg_count >= NUM_FPR_ARG_REGISTERS) + *(double *)next_arg = double_tmp; else - double_tmp = *(double *)*p_argv; - + *fpr_base++ = double_tmp; + next_arg++; + fparg_count++; + FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); + break; + case FFI_TYPE_DOUBLE: + double_tmp = *(double *)*p_argv; if (fparg_count >= NUM_FPR_ARG_REGISTERS) *(double *)next_arg = double_tmp; else |