This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [PATCH] src/arm/sysv.S: Fix ffi_call_VFP with no VFP arguments
- From: Anthony Green <green at moxielogic dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: libffi-discuss at sourceware dot org, patches at linaro dot org
- Date: Fri, 28 Feb 2014 00:28:15 -0500
- Subject: Re: [PATCH] src/arm/sysv.S: Fix ffi_call_VFP with no VFP arguments
- Authentication-results: sourceware.org; auth=none
- References: <1390318359-4608-1-git-send-email-will dot newton at linaro dot org>
Will Newton <will.newton@linaro.org> writes:
> When no VFP arguments are present the IP register is used
> uninitialized. Initialize it to the value of FP.
>
> This fixes a number of testsuite failures when configured for
> armv7l-unknown-linux-gnueabihf:
Thanks Will!
AG
>
> FAIL: libffi.call/cls_3byte1.c -O0 -W -Wall execution test
> FAIL: libffi.call/cls_3byte2.c -O0 -W -Wall execution test
> FAIL: libffi.call/cls_4_1byte.c -O0 -W -Wall execution test
> FAIL: libffi.call/cls_4byte.c -O0 -W -Wall execution test
> FAIL: libffi.call/cls_3byte1.c -O2 execution test
> FAIL: libffi.call/cls_3byte2.c -O2 execution test
> FAIL: libffi.call/cls_4_1byte.c -O2 execution test
> FAIL: libffi.call/cls_4byte.c -O2 execution test
> FAIL: libffi.call/cls_3byte1.c -O3 execution test
> FAIL: libffi.call/cls_3byte2.c -O3 execution test
> FAIL: libffi.call/cls_4_1byte.c -O3 execution test
> FAIL: libffi.call/cls_4byte.c -O3 execution test
> FAIL: libffi.call/cls_3byte1.c -Os execution test
> FAIL: libffi.call/cls_3byte2.c -Os execution test
> FAIL: libffi.call/cls_4_1byte.c -Os execution test
> FAIL: libffi.call/cls_4byte.c -Os execution test
> FAIL: libffi.call/cls_3byte1.c -O2 -fomit-frame-pointer execution test
> FAIL: libffi.call/cls_3byte2.c -O2 -fomit-frame-pointer execution test
> FAIL: libffi.call/cls_4_1byte.c -O2 -fomit-frame-pointer execution test
> FAIL: libffi.call/cls_4byte.c -O2 -fomit-frame-pointer execution test
> ---
> src/arm/sysv.S | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/arm/sysv.S b/src/arm/sysv.S
> index 454dfc9..8ab6d63 100644
> --- a/src/arm/sysv.S
> +++ b/src/arm/sysv.S
> @@ -368,6 +368,7 @@ ARM_FUNC_START ffi_call_VFP
>
> @ Load VFP register args if needed
> cmp r0, #0
> + mov ip, fp
> beq LSYM(Lbase_args)
>
> @ Load only d0 if possible