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: AKASHI Takahiro <takahiro dot akashi at linaro dot org>
- 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: Tue, 19 Apr 2016 09:44:37 +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> <20160419061624 dot GB13600 at linaro dot org>
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.
Alexander