mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
linux-user/s390x: Save/restore fpc when handling a signal
Linux kernel does this in fpregs_store() and fpregs_load(), so qemu-user should do this as well. Found by running valgrind's none/tests/s390x/test_sig. Signed-off-by: Ilya Leoshkevich <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]>
This commit is contained in:
1 parent
9e59899f8c
commit
2941e0fa05
1 file changed
+2
@@ -146,6 +146,7 @@ static void save_sigregs(CPUS390XState *env, target_sigregs *sregs)
|
||||
* We have to store the fp registers to current->thread.fp_regs
|
||||
* to merge them with the emulated registers.
|
||||
*/
|
||||
__put_user(env->fpc, &sregs->fpregs.fpc);
|
||||
for (i = 0; i < 16; i++) {
|
||||
__put_user(*get_freg(env, i), &sregs->fpregs.fprs[i]);
|
||||
}
|
||||
@@ -331,6 +332,7 @@ static void restore_sigregs(CPUS390XState *env, target_sigregs *sc)
|
||||
for (i = 0; i < 16; i++) {
|
||||
__get_user(env->aregs[i], &sc->regs.acrs[i]);
|
||||
}
|
||||
__get_user(env->fpc, &sc->fpregs.fpc);
|
||||
for (i = 0; i < 16; i++) {
|
||||
__get_user(*get_freg(env, i), &sc->fpregs.fprs[i]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user