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: AKASHI Takahiro <takahiro dot akashi at linaro dot org>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: 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, guohanjun at huawei dot com, "Yangfei (Felix)" <felix dot yang at huawei dot com>, jiangjiji at huawei dot com, nd at arm dot com
- Date: Wed, 20 Apr 2016 09:36:17 +0900
- 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> <20160419061624 dot GB13600 at linaro dot org> <alpine dot LNX dot 2 dot 20 dot 1604190941370 dot 5544 at monopod dot intra dot ispras dot ru>
On Tue, Apr 19, 2016 at 09:44:37AM +0300, Alexander Monakov wrote:
> On Tue, 19 Apr 2016, AKASHI Takahiro wrote:
> > > looking at [2] i don't see why
> > >
> > > func:
> > > mov x9, x30
> > > bl _tracefunc
> > > <function body>
> >
> > Actually,
> > mov x9, x30
> > bl _tracefunc
> > mov x30, x9
> > <function body>
>
> I think here Szabolcs' point was that the last instruction can be eliminated:
> _tracefunc can be responsible for restoring x30, and can use x9 to return to
> its caller. It has a non-standard calling convention and needs to be
> implemented in assembly anyway.
OK, but in _tracefunc, x30 has been updated, and so we should
return as follows:
mov xTMP, x30
mov x30, x9
ret xTMP
We need one more temp register here...
Thanks,
-Takahiro AKASHI
> Alexander