[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 30/36] target/ppc: Simplify encode_trampoline
From: |
Richard Henderson |
Subject: |
[PATCH v2 30/36] target/ppc: Simplify encode_trampoline |
Date: |
Tue, 6 Jul 2021 16:49:26 -0700 |
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>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
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 edfad28a37..70cc27b0f6 100644
--- a/linux-user/ppc/signal.c
+++ b/linux-user/ppc/signal.c
@@ -308,10 +308,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.25.1
- [PATCH v2 21/36] linux-user/x86_64: Raise SIGSEGV if SA_RESTORER not set, (continued)
- [PATCH v2 21/36] linux-user/x86_64: Raise SIGSEGV if SA_RESTORER not set, Richard Henderson, 2021/07/06
- [PATCH v2 23/36] linux-user/x86_64: Add vdso, Richard Henderson, 2021/07/06
- [PATCH v2 22/36] linux-user/i386: Add vdso and use it for sigreturn, Richard Henderson, 2021/07/06
- [PATCH v2 28/36] linux-user/nios2: Document non-use of setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 25/36] linux-user/microblaze: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 29/36] linux-user/openrisc: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 27/36] linux-user/mips: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 26/36] linux-user/mips: Tidy install_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 24/36] linux-user/m68k: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 30/36] target/ppc: Simplify encode_trampoline,
Richard Henderson <=
- [PATCH v2 31/36] linux-user/ppc: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 33/36] linux-user/s390x: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 32/36] linux-user/riscv: Add vdso and use it for sigreturn, Richard Henderson, 2021/07/06
- [PATCH v2 34/36] linux-user/sh4: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 35/36] linux-user/sparc: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- [PATCH v2 36/36] linux-user/xtensa: Implement setup_sigtramp, Richard Henderson, 2021/07/06
- Re: [PATCH v2 00/36] linux-user: Signal trampolines and vdsos, Philippe Mathieu-Daudé, 2021/07/08