mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/arm: Replace magic GIC values by proper definitions
Prefer the FIELD_DP64() macro and self-describing GIC definitions over magic values. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
committed by
Peter Maydell
parent
d3a2ee5fe2
commit
674fe90667
+2
-2
@@ -5007,7 +5007,7 @@ static uint64_t id_pfr1_read(CPUARMState *env, const ARMCPRegInfo *ri)
|
||||
uint64_t pfr1 = GET_IDREG(&cpu->isar, ID_PFR1);
|
||||
|
||||
if (env->gicv3state) {
|
||||
pfr1 |= 1 << 28;
|
||||
pfr1 = FIELD_DP64(pfr1, ID_PFR1, GIC, 1);
|
||||
}
|
||||
return pfr1;
|
||||
}
|
||||
@@ -5018,7 +5018,7 @@ static uint64_t id_aa64pfr0_read(CPUARMState *env, const ARMCPRegInfo *ri)
|
||||
uint64_t pfr0 = GET_IDREG(&cpu->isar, ID_AA64PFR0);
|
||||
|
||||
if (env->gicv3state) {
|
||||
pfr0 |= 1 << 24;
|
||||
pfr0 = FIELD_DP64(pfr0, ID_AA64PFR0, GIC, 1);
|
||||
}
|
||||
return pfr0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user