mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-24 02:35:35 +00:00
target-sparc: fix Nucleus quad LDD 128 bit access for windowed registers
Fix register offset calculation when regwptr is used. Backports commit 01a780d51a3a0851729e1747f3787a0db4d96722 from qemu
This commit is contained in:
parent
7dcdae9807
commit
34472bd6fd
|
@ -2064,11 +2064,11 @@ void helper_ldda_asi(CPUSPARCState *env, target_ulong addr, int asi, int rd)
|
||||||
bswap64s(&env->gregs[rd + 1]);
|
bswap64s(&env->gregs[rd + 1]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
env->regwptr[rd] = cpu_ldq_nucleus(env, addr);
|
env->regwptr[rd - 8] = cpu_ldq_nucleus(env, addr);
|
||||||
env->regwptr[rd + 1] = cpu_ldq_nucleus(env, addr + 8);
|
env->regwptr[rd + 1 - 8] = cpu_ldq_nucleus(env, addr + 8);
|
||||||
if (asi == 0x2c) {
|
if (asi == 0x2c) {
|
||||||
bswap64s(&env->regwptr[rd]);
|
bswap64s(&env->regwptr[rd - 8]);
|
||||||
bswap64s(&env->regwptr[rd + 1]);
|
bswap64s(&env->regwptr[rd + 1 - 8]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2081,8 +2081,8 @@ void helper_ldda_asi(CPUSPARCState *env, target_ulong addr, int asi, int rd)
|
||||||
env->gregs[rd] = helper_ld_asi(env, addr, asi, 4, 0);
|
env->gregs[rd] = helper_ld_asi(env, addr, asi, 4, 0);
|
||||||
env->gregs[rd + 1] = helper_ld_asi(env, addr + 4, asi, 4, 0);
|
env->gregs[rd + 1] = helper_ld_asi(env, addr + 4, asi, 4, 0);
|
||||||
} else {
|
} else {
|
||||||
env->regwptr[rd] = helper_ld_asi(env, addr, asi, 4, 0);
|
env->regwptr[rd - 8] = helper_ld_asi(env, addr, asi, 4, 0);
|
||||||
env->regwptr[rd + 1] = helper_ld_asi(env, addr + 4, asi, 4, 0);
|
env->regwptr[rd + 1 - 8] = helper_ld_asi(env, addr + 4, asi, 4, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue