Skip to content

Commit

Permalink
Fix many.c testcase for ppc
Browse files Browse the repository at this point in the history
  • Loading branch information
atgreen committed Feb 8, 2013
1 parent 7aab825 commit 8bd15d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2012-04-02 Peter Bergner <bergner@vnet.ibm.com>

* src/powerpc/ffi.c (ffi_prep_args_SYSV): Account for FP args pushed
on the stack.

2013-02-08 Anthony Green <green@moxielogic.com>

* Makefile.am (EXTRA_DIST): Add missing files.
Expand Down
6 changes: 6 additions & 0 deletions src/powerpc/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8bd15d1

Please sign in to comment.