mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/arm: Enable FEAT_CSV2_2 for -cpu max
There is no branch prediction in TCG, therefore there is no need to actually include the context number into the predictor. Therefore all we need to do is add the state for SCXTNUM_ELx. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220506180242.216785-21-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
74b17e1669
commit
7cb1e61851
5 changed files with 86 additions and 2 deletions
|
@ -688,6 +688,8 @@ typedef struct CPUArchState {
|
|||
ARMPACKey apdb;
|
||||
ARMPACKey apga;
|
||||
} keys;
|
||||
|
||||
uint64_t scxtnum_el[4];
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
|
@ -1211,6 +1213,7 @@ void pmu_init(ARMCPU *cpu);
|
|||
#define SCTLR_WXN (1U << 19)
|
||||
#define SCTLR_ST (1U << 20) /* up to ??, RAZ in v6 */
|
||||
#define SCTLR_UWXN (1U << 20) /* v7 onward, AArch32 only */
|
||||
#define SCTLR_TSCXT (1U << 20) /* FEAT_CSV2_1p2, AArch64 only */
|
||||
#define SCTLR_FI (1U << 21) /* up to v7, v8 RES0 */
|
||||
#define SCTLR_IESB (1U << 21) /* v8.2-IESB, AArch64 only */
|
||||
#define SCTLR_U (1U << 22) /* up to v6, RAO in v7 */
|
||||
|
@ -4022,6 +4025,19 @@ static inline bool isar_feature_aa64_dit(const ARMISARegisters *id)
|
|||
return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, DIT) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_scxtnum(const ARMISARegisters *id)
|
||||
{
|
||||
int key = FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, CSV2);
|
||||
if (key >= 2) {
|
||||
return true; /* FEAT_CSV2_2 */
|
||||
}
|
||||
if (key == 1) {
|
||||
key = FIELD_EX64(id->id_aa64pfr1, ID_AA64PFR1, CSV2_FRAC);
|
||||
return key >= 2; /* FEAT_CSV2_1p2 */
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_ssbs(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64pfr1, ID_AA64PFR1, SSBS) != 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue