This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ARM: testsuite gcc.c-torture/execute/20020307-2.c failure
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Richard dot Earnshaw at arm dot com, jeroen dobbelaere <jeroen dot dobbelaere at acunia dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 13 Nov 2002 09:37:24 +0000
- Subject: Re: ARM: testsuite gcc.c-torture/execute/20020307-2.c failure
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> I believe that GCC could handle variable-sized arguments to
> varadic functions if it constructed the entire argument list on the stack
> and then copied the memory image of the beginning of the argument list
> into the argument registers. GCC would perform a block load of all
> argument registers, regardless the actual number of arguments This is a
> finite, well-defined operation and does not require that GCC construct the
> actual register argument list piece by piece.
But would involve moving the stack pointer in the body of the function
(something we generally want to avoid as it makes things harder for the
debugger when there is no frame pointer -- not that we can really compile
this particular extension without one :-) or moving the unpushed data down
in the stack once the register arguments have been removed.
>
> I do not know if the ARM ABI calling convention allows for this
> technique, and GCC currently does not support it, but it allows GCC to
> generate the register arguments without knowing their size, thereby
> supporting the GCC extension and conforming to the target calling
> convention for passing structures.
I really don't think it's worth spending a lot of time on this problem,
and I really don't want to start significantly messing up the ARM back end
in order to support it when there's no evidence of it being in regular use
-- try and write a non-variadic function that uses this feature and yet
still has a prototype if want to see what a mess it causes. Passing
arguments of this type by reference would solve the problem with minimal
invasion into the ARM back-end (we simply define FUNCTION_ARG_PASS_BY_REFER
ENCE in the same way as ia64 has done and we are finished).
R.