Re: How to force gcc to long-call a function (on MIPS)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PRC wrote:
> Here is my code
> 
> --------------------------------------------------
> typedef int (*MY_FUNC_ENTRY)(int) __attribute__(( far ));
> ...
> ((MY_FUNC_ENTRY)func_entry)(para);
> ---------------------------------------------------
> 
> But gcc still generates 'jal ADDR' instead of 'jalr $reg' for this function call.
> How to force gcc to generate 'jalr' for this call?

gcc can see that the cast doesn't do anything and so
deletes it.  Does `-mlong-calls' solve your problem?

What happens when you declare `func_entry' with __attribute__(( far )) ?

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux