mirror of
https://github.com/qemu/qemu.git
synced 2024-11-27 22:03:35 +08:00
target/arm: Move ID_AA64MMFR0 tests up to before MMFR1 and MMFR2
Move the ID_AA64MMFR0 feature test functions up so they are before the ones for ID_AA64MMFR1 and ID_AA64MMFR2. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20231024163510.2972081-4-peter.maydell@linaro.org
This commit is contained in:
parent
326077724a
commit
5181c751af
@ -606,6 +606,66 @@ static inline bool isar_feature_aa64_rme(const ARMISARegisters *id)
|
||||
return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, RME) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran4_lpa2(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_SEX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4) >= 1;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran4_2_lpa2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4_2);
|
||||
return t >= 3 || (t == 0 && isar_feature_aa64_tgran4_lpa2(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran16_lpa2(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN16) >= 2;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran16_2_lpa2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN16_2);
|
||||
return t >= 3 || (t == 0 && isar_feature_aa64_tgran16_lpa2(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran4(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_SEX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4) >= 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran16(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN16) >= 1;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran64(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_SEX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN64) >= 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran4_2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4_2);
|
||||
return t >= 2 || (t == 0 && isar_feature_aa64_tgran4(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran16_2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN16_2);
|
||||
return t >= 2 || (t == 0 && isar_feature_aa64_tgran16(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran64_2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN64_2);
|
||||
return t >= 2 || (t == 0 && isar_feature_aa64_tgran64(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_fgt(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, FGT) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_vh(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, VH) != 0;
|
||||
@ -764,66 +824,6 @@ static inline bool isar_feature_aa64_hbc(const ARMISARegisters *id)
|
||||
return FIELD_EX64(id->id_aa64isar2, ID_AA64ISAR2, BC) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran4_lpa2(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_SEX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4) >= 1;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran4_2_lpa2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4_2);
|
||||
return t >= 3 || (t == 0 && isar_feature_aa64_tgran4_lpa2(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran16_lpa2(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN16) >= 2;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran16_2_lpa2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN16_2);
|
||||
return t >= 3 || (t == 0 && isar_feature_aa64_tgran16_lpa2(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran4(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_SEX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4) >= 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran16(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN16) >= 1;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran64(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_SEX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN64) >= 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran4_2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4_2);
|
||||
return t >= 2 || (t == 0 && isar_feature_aa64_tgran4(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran16_2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN16_2);
|
||||
return t >= 2 || (t == 0 && isar_feature_aa64_tgran16(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_tgran64_2(const ARMISARegisters *id)
|
||||
{
|
||||
unsigned t = FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN64_2);
|
||||
return t >= 2 || (t == 0 && isar_feature_aa64_tgran64(id));
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_fgt(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64mmfr0, ID_AA64MMFR0, FGT) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_dit(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, DIT) != 0;
|
||||
|
Loading…
Reference in New Issue
Block a user