[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/26] linux-user/ppc: Simplify encode_trampoline
From: |
Laurent Vivier |
Subject: |
[PULL 18/26] linux-user/ppc: Simplify encode_trampoline |
Date: |
Mon, 4 Oct 2021 09:44:13 +0200 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
---
linux-user/ppc/signal.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c
index e4d0dfa3bf75..77f37b9f0131 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,
--
2.31.1
- [PULL 01/26] linux-user: Add infrastructure for a signal trampoline page, (continued)
- [PULL 01/26] linux-user: Add infrastructure for a signal trampoline page, Laurent Vivier, 2021/10/04
- [PULL 16/26] linux-user/nios2: Document non-use of setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 14/26] linux-user/mips: Tidy install_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 04/26] linux-user/arm: Drop "_v2" from symbols in signal.c, Laurent Vivier, 2021/10/04
- [PULL 19/26] linux-user/ppc: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 02/26] linux-user/aarch64: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 03/26] linux-user/arm: Drop v1 signal frames, Laurent Vivier, 2021/10/04
- [PULL 15/26] linux-user/mips: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 07/26] linux-user/cris: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 06/26] linux-user/alpha: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 18/26] linux-user/ppc: Simplify encode_trampoline,
Laurent Vivier <=
- [PULL 10/26] linux-user/i386: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 20/26] linux-user/riscv: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 13/26] linux-user/microblaze: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 25/26] linux-user: Remove default for TARGET_ARCH_HAS_SIGTRAMP_PAGE, Laurent Vivier, 2021/10/04
- [PULL 12/26] linux-user/m68k: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 23/26] linux-user/sparc: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 17/26] linux-user/openrisc: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 24/26] linux-user/xtensa: Implement setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 09/26] linux-user/hppa: Document non-use of setup_sigtramp, Laurent Vivier, 2021/10/04
- [PULL 21/26] linux-user/s390x: Implement setup_sigtramp, Laurent Vivier, 2021/10/04