target/arm: Add ARM_CP_ADD_TLBI_NXS type flag for NXS insns
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 11 Dec 2024 14:44:36 +0000 (14:44 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 17 Dec 2024 15:17:46 +0000 (15:17 +0000)
commita2508d0e29b69525f39733c5726e1412e5663eb0
tree5c7766e0ff4020d0525072d9dcdcbced4d76abee
parent2b745c8f91376b7bf0259b2bfc10015591d2c1c3
target/arm: Add ARM_CP_ADD_TLBI_NXS type flag for NXS insns

All of the TLBI insns with an NXS variant put that variant at the
same encoding but with a CRn field that is one greater than for the
original TLBI insn.  To avoid having to define every TLBI insn
effectively twice, once in the normal way and once in a set of cpreg
arrays that are only registered when FEAT_XS is present, we define a
new ARM_CP_ADD_TLB_NXS type flag for cpregs.  When this flag is set
in a cpreg struct and FEAT_XS is present,
define_one_arm_cp_reg_with_opaque() will automatically add a second
cpreg to the hash table for the TLBI NXS insn with:
 * the crn+1 encoding
 * an FGT field that indicates that it should honour HCR_EL2.FGTnXS
 * a name with the "NXS" suffix

(If there are future TLBI NXS insns that don't use this same
encoding convention, it is also possible to define them manually.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20241211144440.2700268-3-peter.maydell@linaro.org
target/arm/cpregs.h
target/arm/helper.c