This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING][AARCH64, Question] Does AARCH64 GCC support long calls?
- From: "Yangfei (Felix)" <felix dot yang at huawei dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "marcus dot shawcroft at arm dot com" <marcus dot shawcroft at arm dot com>, "richard dot earnshaw at arm dot com" <richard dot earnshaw at arm dot com>, Suipengfei <suipengfei at huawei dot com>
- Date: Sat, 25 Oct 2014 07:00:33 +0000
- Subject: Re: [PING][AARCH64, Question] Does AARCH64 GCC support long calls?
- Authentication-results: sourceware.org; auth=none
- References: <DA41BE1DDCA941489001C7FBD7A8820E5554BF55 at szxema507-mbx dot china dot huawei dot com> <CA+=Sn1n8Bo2Q_ocMoiuuXJPm5NAjhQ=98D6WNUBaJ2eks_xGHg at mail dot gmail dot com> <DA41BE1DDCA941489001C7FBD7A8820E5554BF99 at szxema507-mbx dot china dot huawei dot com> <CA+=Sn1m3pvgR_6vemQrVP_8FDG0XT2=+s7AVkP-cQYVoSE57-A at mail dot gmail dot com>
> > Thanks for the reply. It seems that -mcmodel=large is different from
> -mlong-calls.
> > GCC still emit the BL instruction with -mcmodel=large. I thinks GCC should
> emit BLR instruction with -mlong-calls, right?
>
>
> Oh right. Also it looks like it is not hooked up but the support is partly there:
> /* Return true if calls to DECL should be treated as
> long-calls (ie called via a register). */ static bool aarch64_decl_is_long_call_p
> (const_tree decl ATTRIBUTE_UNUSED) {
> return false;
> }
>
> I had added the attribute in a version for this and the users of the toolchain has
> not reported a bug about it so it seems like it is working.
> I don't have time right now to add support for the option or port the attribute to
> the latest version but it should be easy as returning true from that function when
> the option is turned on.
>
> Thanks,
> Andrew Pinski
>
Thanks Andrew.
I'm interested in this part and already have an initial patch for it.
I can handle this if you don't mind :-)