Re: A query regarding the implementation of pragmas
On Thu, Apr 17, 2008 at 9:31 AM, Jim Wilson [EMAIL PROTECTED] wrote: On Tue, 2008-04-15 at 11:27 +0530, Mohamed Shafi wrote: On Mon, Apr 14, 2008 at 11:44 PM, Jim Wilson [EMAIL PROTECTED] wrote: A simple grep command shows that both arm and rs6000 already both support long call pragmas. I did see those but i coudn't determine whether it is possible to change the attribute of the same function at different points of compilation. Configure and build an arm and/or rs6000 compiler, and then try it, and see what happens. In theory, it should work as you expect. I have checked the implementation of rs6000 and arm and executed programs in rs6000 In both the pragma is to defined around a declaration. More over based on the pragma the attribute of the function in set in 'set_default_type_attributes'. So with this implementation i don't think it is possible to toggle the attribute within a function in which they are being callled. Maybe it might be possible to toggle the attribute between compilational units. Am i right? Regards, Shafi
Re: A query regarding the implementation of pragmas
On Tue, Apr 15, 2008 at 11:27 AM, Mohamed Shafi [EMAIL PROTECTED] wrote: On Mon, Apr 14, 2008 at 11:44 PM, Jim Wilson [EMAIL PROTECTED] wrote: Mohamed Shafi wrote: For a function call will i be able to implement long call/short call for the same function at different locations? Say fun1 calls bar and fun2 calls bar. I want short-call to be generated for bar in fun1 and long-call to be generated in fun2. Is to possible to implement this in the back-end using pragmas? A simple grep command shows that both arm and rs6000 already both support long call pragmas. Using Pragmas will i be able to do something like this int main (void) { short sh; # pragma longcall sh = fun3(); # pragma shortcall sh = fun3(); return 0; } Regards, Shafi.
Re: A query regarding the implementation of pragmas
On Tue, 2008-04-15 at 11:27 +0530, Mohamed Shafi wrote: On Mon, Apr 14, 2008 at 11:44 PM, Jim Wilson [EMAIL PROTECTED] wrote: A simple grep command shows that both arm and rs6000 already both support long call pragmas. I did see those but i coudn't determine whether it is possible to change the attribute of the same function at different points of compilation. Configure and build an arm and/or rs6000 compiler, and then try it, and see what happens. In theory, it should work as you expect. Jim
A query regarding the implementation of pragmas
Hello all, For a function call will i be able to implement long call/short call for the same function at different locations? Say fun1 calls bar and fun2 calls bar. I want short-call to be generated for bar in fun1 and long-call to be generated in fun2. Is to possible to implement this in the back-end using pragmas? Regards, Shafi.
Re: A query regarding the implementation of pragmas
Mohamed Shafi wrote: For a function call will i be able to implement long call/short call for the same function at different locations? Say fun1 calls bar and fun2 calls bar. I want short-call to be generated for bar in fun1 and long-call to be generated in fun2. Is to possible to implement this in the back-end using pragmas? A simple grep command shows that both arm and rs6000 already both support long call pragmas. Jim
Re: A query regarding the implementation of pragmas
On Mon, Apr 14, 2008 at 11:44 PM, Jim Wilson [EMAIL PROTECTED] wrote: Mohamed Shafi wrote: For a function call will i be able to implement long call/short call for the same function at different locations? Say fun1 calls bar and fun2 calls bar. I want short-call to be generated for bar in fun1 and long-call to be generated in fun2. Is to possible to implement this in the back-end using pragmas? A simple grep command shows that both arm and rs6000 already both support long call pragmas. I did see those but i coudn't determine whether it is possible to change the attribute of the same function at different points of compilation. Regards, Shafi