This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, AArch64, PR 61483] builtin va_start incorrectly initializes the field of va_list for incoming unnamed arguments on the stack


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]