diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-03-02 19:36:38 +0000 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2014-03-03 23:03:00 +0200 |
commit | 4cf2348026002d64556f89d0971c663311be2525 (patch) | |
tree | 6075aef45348abe584495c276a5ed016eb665e18 /linux-user/signal.c | |
parent | d844a7b6569fb2b5252773444b18841426e5b906 (diff) |
linux-user/signal.c: Fix AArch64 big-endian FP register restore
Fix the loop restoring the FP registers from the signal frame to match
the one used when setting up the signal frame, so that it handles
TARGET_WORDS_BIGENDIAN being set.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r-- | linux-user/signal.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c index 04638e2ead..29734b2c52 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1233,8 +1233,14 @@ static int target_restore_sigframe(CPUARMState *env, return 1; } - for (i = 0; i < 32 * 2; i++) { - __get_user(env->vfp.regs[i], &aux->fpsimd.vregs[i]); + for (i = 0; i < 32; i++) { +#ifdef TARGET_WORDS_BIGENDIAN + __get_user(env->vfp.regs[i * 2], &aux->fpsimd.vregs[i * 2 + 1]); + __get_user(env->vfp.regs[i * 2 + 1], &aux->fpsimd.vregs[i * 2]); +#else + __get_user(env->vfp.regs[i * 2], &aux->fpsimd.vregs[i * 2]); + __get_user(env->vfp.regs[i * 2 + 1], &aux->fpsimd.vregs[i * 2 + 1]); +#endif } __get_user(fpsr, &aux->fpsimd.fpsr); vfp_set_fpsr(env, fpsr); |