diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-09-29 09:05:45 -0400 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-10-01 12:03:48 +0200 |
commit | 5d2fc70f57916abc6afbe739636dffed6a5009c7 (patch) | |
tree | 5415747f8ca4cbf58ac1628bee255f473eba6acf /linux-user/ppc/signal.c | |
parent | 9ce3ad4452539723d9204dbfc137f57124eb8e36 (diff) |
linux-user/ppc: Simplify encode_trampoline
The sigret parameter is never 0, and even if it was the encoding
of the LI instruction would still work.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210929130553.121567-19-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/ppc/signal.c')
-rw-r--r-- | linux-user/ppc/signal.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c index e4d0dfa3bf..77f37b9f01 100644 --- a/linux-user/ppc/signal.c +++ b/linux-user/ppc/signal.c @@ -309,10 +309,8 @@ static void save_user_regs(CPUPPCState *env, struct target_mcontext *frame) static void encode_trampoline(int sigret, uint32_t *tramp) { /* Set up the sigreturn trampoline: li r0,sigret; sc. */ - if (sigret) { - __put_user(0x38000000 | sigret, &tramp[0]); - __put_user(0x44000002, &tramp[1]); - } + __put_user(0x38000000 | sigret, &tramp[0]); + __put_user(0x44000002, &tramp[1]); } static void restore_user_regs(CPUPPCState *env, |