mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-08 23:15:32 +00:00
target/arm: Fix sve_zcr_len_for_el
Off by one error in the EL2 and EL3 tests. Remove the test against EL3 entirely, since it must always be true. Backports commit 6a02a73211c5bc634fccd652777230954b83ccba from qemu
This commit is contained in:
parent
9f2ff9a66f
commit
c687259bf6
|
@ -5095,10 +5095,10 @@ uint32_t sve_zcr_len_for_el(CPUARMState *env, int el)
|
|||
if (el <= 1) {
|
||||
zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[1]);
|
||||
}
|
||||
if (el < 2 && arm_feature(env, ARM_FEATURE_EL2)) {
|
||||
if (el <= 2 && arm_feature(env, ARM_FEATURE_EL2)) {
|
||||
zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[2]);
|
||||
}
|
||||
if (el < 3 && arm_feature(env, ARM_FEATURE_EL3)) {
|
||||
if (arm_feature(env, ARM_FEATURE_EL3)) {
|
||||
zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[3]);
|
||||
}
|
||||
return zcr_len;
|
||||
|
|
Loading…
Reference in a new issue