All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Eduardo Habkost <eduardo@habkost.net>
Subject: Re: [PATCH v2 2/4] target/i386: Use correct type for get_float_exception_flags() values
Date: Tue, 20 May 2025 10:16:14 +0800	[thread overview]
Message-ID: <aCvl7mx4YI4g8+gT@intel.com> (raw)
In-Reply-To: <20250519145114.2786534-3-peter.maydell@linaro.org>

On Mon, May 19, 2025 at 03:51:12PM +0100, Peter Maydell wrote:
> Date: Mon, 19 May 2025 15:51:12 +0100
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH v2 2/4] target/i386: Use correct type for
>  get_float_exception_flags() values
> X-Mailer: git-send-email 2.43.0
> 
> The softfloat get_float_exception_flags() function returns 'int', but
> in various places in target/i386 we incorrectly store the returned
> value into a uint8_t.  This currently has no ill effects because i386
> doesn't care about any of the float_flag enum values above 0x40.
> However, we want to start using float_flag_input_denormal_used, which
> is 0x4000.
> 
> Switch to using 'int' so that we can handle all the possible valid
> float_flag_* values. This includes changing the return type of
> save_exception_flags() and the argument to merge_exception_flags().
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/i386/ops_sse.h        | 16 +++----
>  target/i386/tcg/fpu_helper.c | 82 ++++++++++++++++++------------------
>  2 files changed, 49 insertions(+), 49 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>



  reply	other threads:[~2025-05-20  1:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 14:51 [PATCH v2 0/4] target/i386: Emulate ftz and denormal flag bits correctly Peter Maydell
2025-05-19 14:51 ` [PATCH v2 1/4] target/i386: Detect flush-to-zero after rounding Peter Maydell
2025-05-19 14:51 ` [PATCH v2 2/4] target/i386: Use correct type for get_float_exception_flags() values Peter Maydell
2025-05-20  2:16   ` Zhao Liu [this message]
2025-05-19 14:51 ` [PATCH v2 3/4] target/i386: Wire up MXCSR.DE and FPUS.DE correctly Peter Maydell
2025-05-20  2:16   ` Zhao Liu
2025-05-19 14:51 ` [PATCH v2 4/4] tests/tcg/x86_64/fma: add test for exact-denormal output Peter Maydell
2025-06-05 18:24 ` [PATCH v2 0/4] target/i386: Emulate ftz and denormal flag bits correctly Paolo Bonzini

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=aCvl7mx4YI4g8+gT@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=eduardo@habkost.net \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.