diff options
author | Warner Losh | 2021-11-13 05:55:59 +0100 |
---|---|---|
committer | Richard Henderson | 2021-11-23 01:47:01 +0100 |
commit | c6cda6a44a8adaeb30bd6dc185f021809625433d (patch) | |
tree | 89da6580df84c90fb5f843f99931bf6a0d421f3a /linux-user/host/mips/host-signal.h | |
parent | Merge tag 'pull-target-arm-20211122-1' of https://git.linaro.org/people/pmayd... (diff) | |
download | qemu-c6cda6a44a8adaeb30bd6dc185f021809625433d.tar.gz qemu-c6cda6a44a8adaeb30bd6dc185f021809625433d.tar.xz qemu-c6cda6a44a8adaeb30bd6dc185f021809625433d.zip |
linux-user: Add host_signal_set_pc to set pc in mcontext
Add a new function host_signal_set_pc to set the next pc in an
mcontext. The caller should ensure this is a valid PC for execution.
Acked-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211113045603.60391-2-imp@bsdimp.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/host/mips/host-signal.h')
-rw-r--r-- | linux-user/host/mips/host-signal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/host/mips/host-signal.h b/linux-user/host/mips/host-signal.h index ef341f7c20..c666ed8c3f 100644 --- a/linux-user/host/mips/host-signal.h +++ b/linux-user/host/mips/host-signal.h @@ -16,6 +16,11 @@ static inline uintptr_t host_signal_pc(ucontext_t *uc) return uc->uc_mcontext.pc; } +static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc) +{ + uc->uc_mcontext.pc = pc; +} + #if defined(__misp16) || defined(__mips_micromips) #error "Unsupported encoding" #endif |