This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Reinstate powerpc bounce buffer copying in ffi.c
- From: Andreas Tobler <andreast-list at fgznet dot ch>
- To: Alan Modra <amodra at gmail dot com>, libffi-discuss at sourceware dot org
- Date: Wed, 13 Nov 2013 20:02:33 +0100
- Subject: Re: Reinstate powerpc bounce buffer copying in ffi.c
- Authentication-results: sourceware.org; auth=none
- References: <20131113140859 dot GZ20756 at bubble dot grove dot modra dot org>
Hi Alan,
On 13.11.13 15:08, Alan Modra wrote:
> Andreas' 2013-02-08 change reverted some breakage for struct return
> values from 2011-11-12, but in so doing reintroduced string
> instructions to sysv.S that are not supported on all powerpc variants.
> This patch properly copies the bounce buffer to destination in C code
> rather than in asm.
>
Thank you!
I can confirm a native powerpc-unknown-freebsd11.0 gives the following:
=== libffi Summary ===
# of expected passes 1819
# of unsupported tests 55
Andreas
> I have tested this on powerpc64-linux, powerpc-linux and
> powerpc-freebsd. Well, the last on powerpc-linux by lying to
> configure with
>
> CC="gcc -m32 -msvr4-struct-return -mlong-double-64" \
> CXX="g++ -m32 -msvr4-struct-return -mlong-double-64" \
> /src/libffi-current/configure --build=powerpc-freebsd
>
> and then
>
> make && make CC="gcc -m32" CXX="g++ -m32" \
> RUNTESTFLAGS=--target_board=unix/-m32/-msvr4-struct-return/-mlong-double-64\
> check
>
> * src/powerpc/ffi.c (ffi_prep_cif_machdep): Revert 2013-02-08
> change. Do not consume an int arg when returning a small struct
> for FFI_SYSV ABI.
> (ffi_call): Only use bounce buffer when FLAG_RETURNS_SMST.
> Properly copy bounce buffer to destination.
> * src/powerpc/sysv.S: Revert 2013-02-08 change.
> * src/powerpc/ppc_closure.S: Remove stray '+'.