This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, AArch64, PR 61483] builtin va_start incorrectly initializes the field of va_list for incoming unnamed arguments on the stack
- From: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- To: Yufeng Zhang <Yufeng dot Zhang at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Fri, 13 Jun 2014 08:26:02 +0100
- Subject: Re: [PATCH, AArch64, PR 61483] builtin va_start incorrectly initializes the field of va_list for incoming unnamed arguments on the stack
- Authentication-results: sourceware.org; auth=none
- References: <5399DD9D dot 5060305 at arm dot com>
On 12 June 2014 18:04, Yufeng Zhang <Yufeng.Zhang@arm.com> wrote:
> Hi,
>
> The patch fixes a bug in the AArch64 backend in calculating the beginning
> address of the unnamed incoming arguments on the stack, i.e. the initial
> value of __va_list->__stack. aarch64_layout_arg incorrectly calculates the
> size of named arguments on stack using the number of registers needed as if
> there were enough registers available. This is wrong, as for instance when
> passed in registers an HFA/HVA* argument takes as many SIMD registers as the
> number of its fields; when passed on the stack, however, it should be passed
> as what its storage layout is (rounded to the nearest multiple of 8 bytes).
>
> The bug only affects builtin va_start, as it is other routines like
> aarch64_pad_arg_upward rather than aarch64_layout_arg which take care of the
> positioning of outgoing arguments on stack and the fetching of the incoming
> named arguments from stack.
>
> The patch has passed bootstrapping.
>
> OK for the trunk and 4.9.1 branch once the regtest passes as well?
OK provided aarch64-none-elf and aarch64_be-none-elf regress without issue.
/Marcus