@samitouri / QOSamiQemu / commits / 9638a5d8ce

target/arm: migrate SME 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-6-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Alex Bennée committed Apr 22, 2026 at 13:52 UTC 9638a5d8cec6ae7713c4b97194c0d4bac0d55353
1 file changed +10 -2
target/arm/syndrome.h
+10 -2
@@ -384,10 +384,18 @@ static inline uint32_t syn_erettrap(int eret_op)
384 return res;
385 }
386
387 +/*
388 + * ISS encoding for an exception due to SME functionality
389 + */
390 +FIELD(SME_ISS, SMTC, 0, 2)
391 +
392 static inline uint32_t syn_smetrap(SMEExceptionType etype, bool is_16bit)
393 {
389 - return (EC_SMETRAP << ARM_EL_EC_SHIFT)
390 - | (is_16bit ? 0 : ARM_EL_IL) | etype;
394 + uint32_t res = syn_set_ec(0, EC_SMETRAP);
395 + res = FIELD_DP32(res, SYNDROME, IL, !is_16bit);
396 + res = FIELD_DP32(res, SME_ISS, SMTC, etype);
397 +
398 + return res;
399 }
400
401 static inline uint32_t syn_pacfail(bool data, int keynumber)