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)
commitef3935eeebffcad148edeb81021733c262db9970
treecba90818844fbcbc29775292eb6e5d5a40f20fab
parenta264bf34424c815d4565cf1ba0e3cd56b7d5c816
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