This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [AArch64] support -mfentry feature for arm64
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>
- Cc: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, Andrew Pinski <pinskia at gmail dot com>, Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>, Li Bin <huawei dot libin at huawei dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Richard Earnshaw <richard dot earnshaw at arm dot com>, andrew dot wafaa at arm dot com, masami dot hiramatsu dot pt at hitachi dot com, geoff at infradead dot org, Takahiro Akashi <takahiro dot akashi at linaro dot org>, guohanjun at huawei dot com, "Yangfei (Felix)" <felix dot yang at huawei dot com>, jiangjiji at huawei dot com, nd <nd at arm dot com>
- Date: Mon, 18 Apr 2016 17:03:11 +0300 (MSK)
- Subject: Re: [PATCH] [AArch64] support -mfentry feature for arm64
- Authentication-results: sourceware.org; auth=none
- References: <1457943260-30894-1-git-send-email-huawei dot libin at huawei dot com> <B6E2AECD-096C-489F-A217-8140E781E722 at linaro dot org> <CA+=Sn1mQOeqZDRP-Yh8qWzbYiBOrMXZoJO7RqX2p6vELLZs3Vg at mail dot gmail dot com> <570FBE14 dot 10904 at arm dot com> <alpine dot LNX dot 2 dot 20 dot 1604181608580 dot 3543 at monopod dot intra dot ispras dot ru> <CAJA7tRY6dJtSYGvegRZGsR-RAVO=nQLbMEROzn7yfDBn20t_bg at mail dot gmail dot com> <alpine dot LNX dot 2 dot 20 dot 1604181636380 dot 3543 at monopod dot intra dot ispras dot ru> <5714E7C3 dot 5030704 at foss dot arm dot com>
On Mon, 18 Apr 2016, Ramana Radhakrishnan wrote:
> > - and GCC is not smart enough to be aware that intra-TU calls to 'func' (the
> > function we're instrumenting) don't touch x16/x17. And GCC should be that
> > smart, if it's not, it's a bug, right? :)
> >
>
> That it already is - IIRC. Otherwise -fipa-ra wouldn't work .
Only if the TU is huge, or -ffunction-sections is in effect, right? Otherwise
if the TU is sufficiently small, GCC can be sure that no veneer is needed. Or
am I missing something?
> Alternatively just add x9 to the list for fipa-ra the same way as x16 / x17
> are handled already , no ?
I wouldn't recommend that; I think making it apparent as a register clobber as
part of unspec signifying the pad is better.
Thanks.
Alexander