From: Richard Henderson <richard.henderson@linaro.org>
To: Brad Smith <brad@comstyle.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <Alistair.Francis@wdc.com>
Cc: qemu-riscv@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] tcg/riscv: Fix building on OpenBSD/riscv64
Date: Thu, 27 Jun 2024 10:20:00 -0700 [thread overview]
Message-ID: <ee7713f2-a05e-4533-a070-97df934d7888@linaro.org> (raw)
In-Reply-To: <ZnzqNlUbHG5Ue6L1@humpty.home.comstyle.com>
On 6/26/24 21:27, Brad Smith wrote:
> tcg/riscv: Fix building on OpenBSD/riscv64
>
> Use ucontext_t/struct sigcontext member name from machine/signal.h
> instead of Linux specific name.
>
> Signed-off-by: Brad Smith <brad@comstyle.com>
> ---
> tcg/riscv/tcg-target.c.inc | 5 +++++
> 1 file changed, 5 insertions(+)
Thanks. I'm going to clean all of this up into util/cpuinfo-riscv.c, similar to other
hosts, and I will include this.
r~
>
> diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc
> index 639363039b..aeae9a8ad8 100644
> --- a/tcg/riscv/tcg-target.c.inc
> +++ b/tcg/riscv/tcg-target.c.inc
> @@ -2116,7 +2116,12 @@ static void sigill_handler(int signo, siginfo_t *si, void *data)
> {
> /* Skip the faulty instruction */
> ucontext_t *uc = (ucontext_t *)data;
> +
> +#ifdef __OpenBSD__
> + uc->sc_sepc += 4;
> +#else
> uc->uc_mcontext.__gregs[REG_PC] += 4;
> +#endif
>
> got_sigill = 1;
> }
next prev parent reply other threads:[~2024-06-27 17:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 4:27 [PATCH] tcg/riscv: Fix building on OpenBSD/riscv64 Brad Smith
2024-06-27 17:20 ` Richard Henderson [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-06-26 7:09 Brad Smith
2024-06-26 10:11 ` Daniel Henrique Barboza
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=ee7713f2-a05e-4533-a070-97df934d7888@linaro.org \
--to=richard.henderson@linaro.org \
--cc=Alistair.Francis@wdc.com \
--cc=brad@comstyle.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@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).