mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
9ce3ad4452
commit
5d2fc70f57
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue