From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu, alex.bennee@linaro.org, qemu-arm@nongnu.org
Subject: [PATCH v2 03/23] linux-user/arm: Split out v2_frame
Date: Fri, 18 Jun 2021 12:29:31 -0700 [thread overview]
Message-ID: <20210618192951.125651-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20210618192951.125651-1-richard.henderson@linaro.org>
Split out a helper function to test for a v2 signal frame.
Cc: qemu-arm@nongnu.org
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/arm/signal.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/linux-user/arm/signal.c b/linux-user/arm/signal.c
index 32b68ee302..cb65623965 100644
--- a/linux-user/arm/signal.c
+++ b/linux-user/arm/signal.c
@@ -165,6 +165,11 @@ static inline int valid_user_regs(CPUARMState *regs)
return 1;
}
+static bool v2_frame(void)
+{
+ return get_osversion() >= 0x020612;
+}
+
static void
setup_sigcontext(struct target_sigcontext *sc, /*struct _fpstate *fpstate,*/
CPUARMState *env, abi_ulong mask)
@@ -422,7 +427,7 @@ sigsegv:
void setup_frame(int usig, struct target_sigaction *ka,
target_sigset_t *set, CPUARMState *regs)
{
- if (get_osversion() >= 0x020612) {
+ if (v2_frame()) {
setup_frame_v2(usig, ka, set, regs);
} else {
setup_frame_v1(usig, ka, set, regs);
@@ -516,7 +521,7 @@ void setup_rt_frame(int usig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUARMState *env)
{
- if (get_osversion() >= 0x020612) {
+ if (v2_frame()) {
setup_rt_frame_v2(usig, ka, info, set, env);
} else {
setup_rt_frame_v1(usig, ka, info, set, env);
@@ -734,7 +739,7 @@ badframe:
long do_sigreturn(CPUARMState *env)
{
- if (get_osversion() >= 0x020612) {
+ if (v2_frame()) {
return do_sigreturn_v2(env);
} else {
return do_sigreturn_v1(env);
@@ -823,7 +828,7 @@ badframe:
long do_rt_sigreturn(CPUARMState *env)
{
- if (get_osversion() >= 0x020612) {
+ if (v2_frame()) {
return do_rt_sigreturn_v2(env);
} else {
return do_rt_sigreturn_v1(env);
--
2.25.1
next prev parent reply other threads:[~2021-06-18 19:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210618192951.125651-1-richard.henderson@linaro.org>
2021-06-18 19:29 ` [PATCH v2 02/23] linux-user/aarch64: Implement setup_sigtramp Richard Henderson
2021-06-29 13:36 ` Peter Maydell
2021-07-01 19:27 ` Richard Henderson
2021-06-18 19:29 ` Richard Henderson [this message]
2021-06-29 13:53 ` [PATCH v2 03/23] linux-user/arm: Split out v2_frame Peter Maydell
2021-06-29 14:30 ` Richard Henderson
2021-06-18 19:29 ` [PATCH v2 04/23] linux-user/arm: Force v2 frames for fdpic Richard Henderson
2021-06-29 13:54 ` Peter Maydell
2021-06-18 19:29 ` [PATCH v2 05/23] linux-user/arm: Implement setup_sigtramp Richard Henderson
2021-06-29 14:09 ` Peter Maydell
2021-06-29 18:32 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210618192951.125651-4-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).