This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Passing arguments of function through registers
- From: Andrew Haley <aph at redhat dot com>
- To: sumanth <sumanth dot gundapneni at redpinesignals dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 10 Feb 2009 11:42:19 +0000
- Subject: Re: Passing arguments of function through registers
- References: <499162C1.9020002@redpinesignals.com> <499164BF.4060602@redhat.com> <499165AF.6090503@redpinesignals.com>
sumanth wrote:
> I am running with -Os level optimization level.
> For the time being assume the processor is arm processor .
OK. Current gcc (4.4 pre) does this with -Os:
00000000 <add>:
0: e0811000 add r1, r1, r0
4: e0810002 add r0, r1, r2
8: e12fff1e bx lr
> Guess I can resolve this with gcc-3.3 itself.
Maybe. I'm quite surprised that any version of gcc generated code
as bad as what you posted.
Andrew.