]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: insn: Add encoder for bitwise operations using literals
authorMarc Zyngier <marc.zyngier@arm.com>
Sun, 3 Dec 2017 17:09:08 +0000 (17:09 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 19 Mar 2018 13:03:27 +0000 (13:03 +0000)
commitcb45f2c27d33d19043fc83398e1eb5b217c184b5
treecba90818844fbcbc29775292eb6e5d5a40f20fab
parent7b9207e719636a8ec837d95194b43970f3d8dff7
arm64: insn: Add encoder for bitwise operations using literals

We lack a way to encode operations such as AND, ORR, EOR that take
an immediate value. Doing so is quite involved, and is all about
reverse engineering the decoding algorithm described in the
pseudocode function DecodeBitMasks().

This has been tested by feeding it all the possible literal values
and comparing the output with that of GAS.

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/insn.h
arch/arm64/kernel/insn.c