@samitouri / QOSamiQemu / commits / a918a18f0e

target/arm: Enable FEAT_FP8 for -cpu max

Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260609192110.752384-25-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Richard Henderson committed Jun 9, 2026 at 12:20 UTC a918a18f0ef682d57e9f34bbdcf2468580131137
3 files changed +10
docs/system/arm/emulation.rst
+1
@@ -75,6 +75,7 @@ the following architecture extensions:
75 - FEAT_FHM (Floating-point half-precision multiplication instructions)
76 - FEAT_FP (Floating Point extensions)
77 - FEAT_FP16 (Half-precision floating-point data processing)
78 +- FEAT_FP8 (FP8 convert instructions)
79 - FEAT_FPAC (Faulting on AUT* instructions)
80 - FEAT_FPACCOMBINE (Faulting on combined pointer authentication instructions)
81 - FEAT_FPACC_SPEC (Speculative behavior of combined pointer authentication instructions)
linux-user/aarch64/elfload.c
+3
@@ -222,6 +222,9 @@ abi_ulong get_elf_hwcap2(CPUState *cs)
222 GET_FEATURE_ID(aa64_faminmax, ARM_HWCAP2_A64_FAMINMAX);
223 GET_FEATURE_ID(aa64_fpmr, ARM_HWCAP2_A64_FPMR);
224 GET_FEATURE_ID(aa64_lut, ARM_HWCAP2_A64_LUT);
225 + GET_FEATURE_ID(aa64_f8cvt, ARM_HWCAP2_A64_F8CVT |
226 + ARM_HWCAP2_A64_F8E4M3 |
227 + ARM_HWCAP2_A64_F8E5M2);
228
229 return hwcaps;
230 }
target/arm/tcg/cpu64.c
+6
@@ -1397,6 +1397,12 @@ void aarch64_max_tcg_initfn(Object *obj)
1397 t = FIELD_DP64(t, ID_AA64SMFR0, FA64, 1); /* FEAT_SME_FA64 */
1398 SET_IDREG(isar, ID_AA64SMFR0, t);
1399
1400 + t = GET_IDREG(isar, ID_AA64FPFR0);
1401 + t = FIELD_DP64(t, ID_AA64FPFR0, F8E5M2, 1); /* FEAT_FP8 */
1402 + t = FIELD_DP64(t, ID_AA64FPFR0, F8E4M3, 1); /* FEAT_FP8 */
1403 + t = FIELD_DP64(t, ID_AA64FPFR0, F8CVT, 1); /* FEAT_FP8 */
1404 + SET_IDREG(isar, ID_AA64FPFR0, t);
1405 +
1406 /* Replicate the same data to the 32-bit id registers. */
1407 aa32_max_features(cpu);
1408