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: Michael Matz <matz at suse dot de>
- To: Andrew Haley <aph at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Apr 2016 19:13:13 +0200 (CEST)
- 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> <alpine dot LSU dot 2 dot 20 dot 1604151739210 dot 20277 at wotan dot suse dot de> <alpine dot LNX dot 2 dot 20 dot 1604152026570 dot 26109 at monopod dot intra dot ispras dot ru> <5714F001 dot 8090408 at redhat dot com>
Hi,
On Mon, 18 Apr 2016, Andrew Haley wrote:
> On 04/15/2016 06:29 PM, Alexander Monakov wrote:
>
> > Alternatively: replace first nop with a short forward branch that
> > jumps over the rest of the pad, patch rest of the pad, patch the
> > initial forward branch.
>
> That may not be safe. Consider an implementation which looks ahead in
> the instruction stream and decodes the instructions speculatively.
It should go without saying that patching instructions is followed by
whatever means necessary to flush any such caches on a particular
implementation (here after patching the jump, after patching the rest, and
after patching the first insn again, i.e. three times). Nothing that GCC
needs to worry about, but the patching infrastructure.
Ciao,
Michael.