This is the mail archive of the
mailing list for the GCC project.
Re: Long calls and short calls
"Mohamed Shafi" <email@example.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.