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: Long calls and short calls


"Mohamed Shafi" <shafitvm@gmail.com> writes:
> The gcc port that i am currently working on has both long calls and
> short calls. If no 'shortcall' attribute is provided in the function
> declaration then calls to that function is made as long call. This is
> happening when no optimization is enabled. But when optimization is
> enabled combine pass is merging the instructions to replace the long
> call with short call.

I assume you're currently handling this in the call and call_value
expanders?  You need to handle it in the define_insns too, by making
the predicates and constraints forbid direct calls to longcall symbols.
See the MIPS port for an example.

Richard


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