Hello, I would like to know how the keil compiler locate the arguments of a function. 1) it pass it via the stack? 2) it declares a places in the memory space, and in this case how he choose the memory space that it will use? Thank You Kaoru
I am sorry I don't understand what is "leaf"... The only difference between the function is the moment that i use the parameter. In the function that is compiled by passing parameter in the register, the variable is used just after the declarations. But for the other the variable is used in the middle of the function. the NOREGPARAMS is a good idea but as i want that the compilation is always the same, i have to locate those arguments. Can you tell me if it is possible? I tried to do it without success. Thank you Kaoru
i have to locate those arguments. Can you tell me if it is possible? If I understand you, you want to locate the arguments to several functions to the same address. For example:
int func_a (int arg_a, int arg_b, int arg_c); int func_b (int arg_a, int arg_b, int arg_c); int func_c (int arg_a, int arg_b, int arg_c);
int arg_a, arg_b, arg_c; int func_a (void); int func_b (void); int func_c (void);