qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Lucas Mateus Castro(alqotel)" <lucas.araujo@eldorado.org.br>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Cc: danielhb413@gmail.com
Subject: Re: [PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test
Date: Thu, 18 Aug 2022 08:32:15 -0700	[thread overview]
Message-ID: <b219c68d-76e2-dd95-7855-99a58b5e5e95@linaro.org> (raw)
In-Reply-To: <20220817165704.165291-1-lucas.araujo@eldorado.org.br>

On 8/17/22 09:57, Lucas Mateus Castro(alqotel) wrote:
> +void sigfpe_handler(int sig, siginfo_t *si, void *ucontext)
> +{
> +    uint64_t t;
> +    uint64_t ch = 0x5fcfffe4965a17e0ull;
> +    asm (
> +        "stfd 2, %0\n\t"
> +        : "=m"(t)
> +        :
> +        : "memory", "fr2"
> +    );

No, you need to fetch f2 from ucontext.  There's no guarantee of any specific values being 
present in the signal handler otherwise.

> +    return -1;

exit(-1), which return from main equates to, helpful over EXIT_FAILURE.
But here I'd tend to abort(), since it really shouldn't be reachable.


r~


  parent reply	other threads:[~2022-08-18 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 16:57 [PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test Lucas Mateus Castro(alqotel)
2022-08-17 16:57 ` [PATCH 2/2] tests/tcg/ppc64le: Added an underflow with UE=1 test Lucas Mateus Castro(alqotel)
2022-08-18 15:32 ` Richard Henderson [this message]
2022-08-18 16:14   ` [PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test Lucas Mateus Martins Araujo e Castro

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=b219c68d-76e2-dd95-7855-99a58b5e5e95@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=danielhb413@gmail.com \
    --cc=lucas.araujo@eldorado.org.br \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).