diff options
author | Anthony Green <green@moxielogic.com> | 2013-02-08 13:56:37 -0500 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2013-02-08 13:56:37 -0500 |
commit | 8bd15d139a58a6e46dc90a1cb2d89f59f32f06c7 (patch) | |
tree | c0ce3e62cb83277d79819bbf919b0dc54f05abdc /src/powerpc | |
parent | 7aab825cf198be85490d3cd80e778d415d85ad9b (diff) | |
download | libffi-8bd15d139a58a6e46dc90a1cb2d89f59f32f06c7.tar.gz |
Fix many.c testcase for ppc
Diffstat (limited to 'src/powerpc')
-rw-r--r-- | src/powerpc/ffi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/powerpc/ffi.c b/src/powerpc/ffi.c index 257f02f..add43e0 100644 --- a/src/powerpc/ffi.c +++ b/src/powerpc/ffi.c @@ -367,6 +367,12 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack) /* Check that we didn't overrun the stack... */ FFI_ASSERT (copy_space.c >= next_arg.c); FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS); + /* The assert below is testing that the number of integer arguments agrees + with the number found in ffi_prep_cif_machdep(). However, intarg_count + is incremeneted whenever we place an FP arg on the stack, so account for + that before our assert test. */ + if (fparg_count > NUM_FPR_ARG_REGISTERS) + intarg_count -= fparg_count - NUM_FPR_ARG_REGISTERS; #ifndef __NO_FPRS__ FFI_ASSERT (fpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); |