|
Hi,
No.. total number of arguments that u can pass to a function is not 4 for sure.. I had similar
kind of problem with my system... the thing is the arguments are being passed thru regsiters
and if all registers are used up then thru stack...
The reason I see for changing values ( when u pass them to function) is because after you pass
the arguments.. the registers are used by the processor to perform different tasks so the
register no longer represents the variable.. ( wht i mean to say is regsiter is not fixed
address of the variable) value of variable is placed on to stack .. and later on accessed back
when needed.. all this is internally taken care of by compiler .. provided u hav proper stack
allocation .. ..
I would definately recommend you to go thru part 8.4 Run time Environment (
of TMS320C6000 Optimizing Compiler User’s Guide (SPRU187K)
http://focus.ti.com/lit/ug/spru187k/spru187k.pdf
hope this helps..
Best Regards,
Tarang Dadia
Graduate Student
Wireless Networking Lab
University of Texas - Arlington
On Sat, 05 Jun 2004 Andrew Nesterov wrote :
>It seem as if the erroneous function call differs from the
>function declaration. There are three places to check to
>be coherent: the function declaration (in an include file),
>the function definition (check the paramemters of the
>implementation) and the function call.
>The stack size wouldn't affect on a call with a resonable
>number of arguments, since they are passed in the registers.
>Regards,
>Andrew
>> Date: Thu, 3 Jun 2004 20:45:45 -0700 (PDT)
>> From: Zulfiqar Khan <z...@yahoo.com>
>> Subject: Max Number Of Arguments passed to function is t maximum 4?
>>
>> Hello
>> Can any one help me in solving the following problem :
>>
>> If numbe of aguments passed to a funcrion exceeds from
>> 4 the function gives irrtaing behaviour. I mean if fo
>> example i passed the argumnt 315 to the function the
>> function converts it to 0 & then to 235, i.e. no
>> contol on the value.
>>
>> I have increased the stack size but it does not solve
>> my problem
>>
>> Looking for the favourarable reply
>>
>> Zulfiqar
>>
>_____________________________________
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
>Yahoo! Groups Links
>To BR>
>.
>
|