Skip to content

Commit 674fe90

Browse files
philmdpm215
authored andcommitted
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>
1 parent d3a2ee5 commit 674fe90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

target/arm/helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5007,7 +5007,7 @@ static uint64_t id_pfr1_read(CPUARMState *env, const ARMCPRegInfo *ri)
50075007
uint64_t pfr1 = GET_IDREG(&cpu->isar, ID_PFR1);
50085008

50095009
if (env->gicv3state) {
5010-
pfr1 |= 1 << 28;
5010+
pfr1 = FIELD_DP64(pfr1, ID_PFR1, GIC, 1);
50115011
}
50125012
return pfr1;
50135013
}
@@ -5018,7 +5018,7 @@ static uint64_t id_aa64pfr0_read(CPUARMState *env, const ARMCPRegInfo *ri)
50185018
uint64_t pfr0 = GET_IDREG(&cpu->isar, ID_AA64PFR0);
50195019

50205020
if (env->gicv3state) {
5021-
pfr0 |= 1 << 24;
5021+
pfr0 = FIELD_DP64(pfr0, ID_AA64PFR0, GIC, 1);
50225022
}
50235023
return pfr0;
50245024
}

0 commit comments

Comments
 (0)