This is the mail archive of the gcc-help@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: Passing arguments of function through registers


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.


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