target/arm: migrate BTI trap syndromes to registerfields
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20260422125250.1303100-8-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Alex Bennée committed
Apr 22, 2026 at 13:52 UTC
35b87b1b803f79712c9ab68be16998f48301e90a
1 file changed
+10
-1
target/arm/syndrome.h
+10
-1
@@ -426,9 +426,18 @@ static inline uint32_t syn_pactrap(void)
426
return res;
427
}
428
429
+/*
430
+ * ISS encoding for an exception from a Branch Target Identification
431
+ * instruction.
432
+ */
433
+FIELD(BTI_ISS, BTYPE, 0, 2)
434
+
435
static inline uint32_t syn_btitrap(int btype)
436
{
431
- return (EC_BTITRAP << ARM_EL_EC_SHIFT) | ARM_EL_IL | btype;
437
+ uint32_t res = syn_set_ec(0, EC_BTITRAP);
438
+ res = FIELD_DP32(res, SYNDROME, IL, 1);
439
+ res = FIELD_DP32(res, BTI_ISS, BTYPE, btype);
440
+ return res;
441
}
442
443
static inline uint32_t syn_bxjtrap(int cv, int cond, int rm)