linux-user/sparc: Don't restore %g7 in sparc64_set_context()
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 6 Nov 2020 15:27:37 +0000 (15:27 +0000)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 18 Dec 2020 10:23:29 +0000 (11:23 +0100)
The kernel does not restore the g7 register in sparc64_set_context();
neither should we. (We still save it in sparc64_get_context().)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201106152738.26026-4-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/sparc/signal.c

index 58b48afe29c963e394bad64d5bcae9c90161c4dd..d92e096cafa77bbe712433b0cc3301da5f46f2fd 100644 (file)
@@ -447,7 +447,7 @@ void sparc64_set_context(CPUSPARCState *env)
     __get_user(env->gregs[4], (&(*grp)[SPARC_MC_G4]));
     __get_user(env->gregs[5], (&(*grp)[SPARC_MC_G5]));
     __get_user(env->gregs[6], (&(*grp)[SPARC_MC_G6]));
-    __get_user(env->gregs[7], (&(*grp)[SPARC_MC_G7]));
+    /* Skip g7 as that's the thread register in userspace */
 
     /*
      * Note that unlike the kernel, we didn't need to mess with the