target/arm: report ARMv8-A FP support for AArch32 -cpu max
PATCH v2 1/1 target/arm: report ARMv8-A FP support for AArch32 -cpu max
When we converted to using feature bits in 602f6e42cfbf we missed out the fact (dp && arm_dc_feature(s, ARM_FEATURE_V8)) was supported for -cpu max configurations. This caused a regression in the GCC test suite. Fix this by setting the appropriate bits in mvfr1.FPHP to report ARMv8-A with FP support (but not ARMv8.2-FP16).
--- target/arm/cpu.c | 4 ++++ 1 file changed, 4 insertions(+)
target/arm/cpu.c +4 -0
@@ -2452,6 +2452,10 @@ static void arm_max_initfn(Object *obj) t =FIELD_DP32 (t,ID_ISAR6 ,SPECRES ,1 ); cpu->isar.id_isar6 = t; + t = cpu->isar.mvfr1; + t =FIELD_DP32 (t,MVFR1 ,FPHP ,2 );/* v8.0 FP support */ + cpu->isar.mvfr1 = t; + t = cpu->isar.mvfr2; t =FIELD_DP32 (t,MVFR2 ,SIMDMISC ,3 );/* SIMD MaxNum */ t =FIELD_DP32 (t,MVFR2 ,FPMISC ,4 );/* FP MaxNum */
Signature · 1 line
2.20.1
Peter Maydell
AppliedQuoted 30 lines · Alex Bennée
When we converted to using feature bits in
602f6e42cfbfwe missed out the fact (dp &&arm_dc_feature(s, ARM_FEATURE_V8)) was supported for -cpu max configurations. This caused a regression in the GCC test suite. Fix this by setting the appropriate bits in mvfr1.FPHP to report ARMv8-A with FP support (but not ARMv8.2-FP16).Signed-off-by Alex Bennée <[email protected]>Reviewed-by Richard Henderson <[email protected]>--- target/arm/cpu.c | 4 ++++ 1 file changed, 4 insertions(+)target/arm/cpu.c +4
-1@@ -2452,6 +2452,10 @@ static void arm_max_initfn(Object *obj) t =FIELD_DP32 (t,ID_ISAR6 ,SPECRES ,1 ); cpu->isar.id_isar6 = t; + t = cpu->isar.mvfr1; + t =FIELD_DP32 (t,MVFR1 ,FPHP ,2 );/* v8.0 FP support */ + cpu->isar.mvfr1 = t; + t = cpu->isar.mvfr2; t =FIELD_DP32 (t,MVFR2 ,SIMDMISC ,3 );/* SIMD MaxNum */ t =FIELD_DP32 (t,MVFR2 ,FPMISC ,4 );/* FP MaxNum */ --
Quoted 1 line
2.20.1
Applied to target-arm.next, thanks.
-- PMM