This is the mail archive of the gcc@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: A query regarding the implementation of pragmas


On Tue, Apr 15, 2008 at 11:27 AM, Mohamed Shafi <shafitvm@gmail.com> wrote:
>
> On Mon, Apr 14, 2008 at 11:44 PM, Jim Wilson <wilson@tuliptree.org> 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.


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