From: Will Deacon <will@kernel.org>
To: Jianlin Lv <Jianlin.Lv@arm.com>
Cc: bpf@vger.kernel.org, zlim.lnx@gmail.com, catalin.marinas@arm.com,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, iecedge@gmail.com
Subject: Re: [PATCH bpf-next] bpf: arm64: Redefine MOV consistent with arch insn
Date: Tue, 30 Mar 2021 10:31:49 +0100 [thread overview]
Message-ID: <20210330093149.GA5281@willie-the-truck> (raw)
In-Reply-To: <20210330074235.525747-1-Jianlin.Lv@arm.com>
On Tue, Mar 30, 2021 at 03:42:35PM +0800, Jianlin Lv wrote:
> A64_MOV is currently mapped to Add Instruction. Architecturally MOV
> (register) is an alias of ORR (shifted register) and MOV (to or from SP)
> is an alias of ADD (immediate).
> This patch redefines A64_MOV and uses existing functionality
> aarch64_insn_gen_move_reg() in insn.c to encode MOV (register) instruction.
> For moving between register and stack pointer, rename macro to A64_MOV_SP.
What does this gain us? There's no requirement for a BPF "MOV" to match an
arm64 architectural "MOV", so what's the up-side of aligning them like this?
Cheers,
Will
next prev parent reply other threads:[~2021-03-30 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 7:42 [PATCH bpf-next] bpf: arm64: Redefine MOV consistent with arch insn Jianlin Lv
2021-03-30 9:31 ` Will Deacon [this message]
2021-03-31 9:22 ` Jianlin Lv
2021-03-31 9:28 ` Will Deacon
2021-03-31 9:42 ` Jianlin Lv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210330093149.GA5281@willie-the-truck \
--to=will@kernel.org \
--cc=Jianlin.Lv@arm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel@iogearbox.net \
--cc=iecedge@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
--cc=zlim.lnx@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox