mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 02:55:06 +00:00
target/arm: Define and use any_predinv isar_feature test
Instead of open-coding "ARM_FEATURE_AARCH64 ? aa64_predinv: aa32_predinv", define and use an any_predinv isar_feature test function. Backports commit 22e570730d15374453baa73ff2a699e01ef4e950 from qemu
This commit is contained in:
parent
62178626e4
commit
b1c088e2f2
|
@ -3550,6 +3550,11 @@ static inline bool isar_feature_any_fp16(const ARMISARegisters *id)
|
|||
return isar_feature_aa64_fp16(id) || isar_feature_aa32_fp16_arith(id);
|
||||
}
|
||||
|
||||
static inline bool isar_feature_any_predinv(const ARMISARegisters *id)
|
||||
{
|
||||
return isar_feature_aa64_predinv(id) || isar_feature_aa32_predinv(id);
|
||||
}
|
||||
|
||||
/*
|
||||
* Forward to the above feature tests given an ARMCPU pointer.
|
||||
*/
|
||||
|
|
|
@ -7492,14 +7492,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
|
|||
#endif /*CONFIG_USER_ONLY*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
* While all v8.0 cpus support aarch64, QEMU does have configurations
|
||||
* that do not set ID_AA64ISAR1, e.g. user-only qemu-arm -cpu max,
|
||||
* which will set ID_ISAR6.
|
||||
*/
|
||||
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)
|
||||
? cpu_isar_feature(aa64_predinv, cpu)
|
||||
: cpu_isar_feature(aa32_predinv, cpu)) {
|
||||
if (cpu_isar_feature(any_predinv, cpu)) {
|
||||
define_arm_cp_regs(cpu, predinv_reginfo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue