[PATCH v2 07/12] linux-user/sparc: Fix WREG usage in setup_frame

Richard Henderson posted 12 patches 6 years, 3 months ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Riku Voipio <riku.voipio@iki.fi>, "Alex Bennée" <alex.bennee@linaro.org>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
There is a newer version of this series
[PATCH v2 07/12] linux-user/sparc: Fix WREG usage in setup_frame
Posted by Richard Henderson 6 years, 3 months ago
Use WREG_I0 not WREG_O0 in order to properly save the "ins".
The "outs" were saved separately in setup___siginfo.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 linux-user/sparc/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c
index 0db4c5f84f..efb0df7e2b 100644
--- a/linux-user/sparc/signal.c
+++ b/linux-user/sparc/signal.c
@@ -192,7 +192,7 @@ void setup_frame(int sig, struct target_sigaction *ka,
         __put_user(env->regwptr[i + WREG_L0], &sf->ss.locals[i]);
     }
     for (i = 0; i < 8; i++) {
-        __put_user(env->regwptr[i + WREG_O0], &sf->ss.ins[i]);
+        __put_user(env->regwptr[i + WREG_I0], &sf->ss.ins[i]);
     }
     if (err)
         goto sigsegv;
-- 
2.17.1


Re: [PATCH v2 07/12] linux-user/sparc: Fix WREG usage in setup_frame
Posted by Laurent Vivier 6 years, 3 months ago
Le 25/10/2019 à 13:39, Richard Henderson a écrit :
> Use WREG_I0 not WREG_O0 in order to properly save the "ins".
> The "outs" were saved separately in setup___siginfo.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/sparc/signal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c
> index 0db4c5f84f..efb0df7e2b 100644
> --- a/linux-user/sparc/signal.c
> +++ b/linux-user/sparc/signal.c
> @@ -192,7 +192,7 @@ void setup_frame(int sig, struct target_sigaction *ka,
>          __put_user(env->regwptr[i + WREG_L0], &sf->ss.locals[i]);
>      }
>      for (i = 0; i < 8; i++) {
> -        __put_user(env->regwptr[i + WREG_O0], &sf->ss.ins[i]);
> +        __put_user(env->regwptr[i + WREG_I0], &sf->ss.ins[i]);
>      }
>      if (err)
>          goto sigsegv;
> 

Applied to my linux-user branch.

Thanks,
Laurent