[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] How many parameters to function ?
|
From: |
J Wunsch |
|
Subject: |
Re: [avr-gcc-list] How many parameters to function ? |
|
Date: |
Fri Jan 12 00:44:04 2001 |
address@hidden (Robert Rozman) wrote:
> Is there any restrictions on number of parameters or I'm just doing
> something wrong ? - I'm using win32 port from Volker Oth.
I have no problems compiling the following. If i look at the
generated assembler file (avr-gcc -S -mmcu=... ), it looks completely
OK:
int
func(int a, int b, int c, int d, int e, int f, int g)
{
return a + b + c + d + e + f + g;
}
int
main(void)
{
func(3, 5, 8, 9, 24, 30, 1);
return 0;
}
Parameters a through e are being passed directly (r24/r25 down through
r16/r17), the remainder is being passed as reference to constant
values. I'd assume for more parameters to be passed on stack, but
didn't try yet.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j