qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 for-10.0 34/54] fpu: Allow runtime choice of default NaN v


From: Richard Henderson
Subject: Re: [PATCH v2 for-10.0 34/54] fpu: Allow runtime choice of default NaN value
Date: Mon, 2 Dec 2024 11:26:04 -0600
User-agent: Mozilla Thunderbird

On 12/2/24 07:13, Peter Maydell wrote:
Currently we hardcode the default NaN value in parts64_default_nan()
using a compile-time ifdef ladder. This is awkward for two cases:
  * for single-QEMU-binary we can't hard-code target-specifics like this
  * for Arm FEAT_AFP the default NaN value depends on FPCR.AH
    (specifically the sign bit is different)

Add a field to float_status to specify the default NaN value; fall
back to the old ifdef behaviour if these are not set.

The default NaN value is specified by setting a uint8_t to a
pattern corresponding to the sign and upper fraction parts of
the NaN; the lower bits of the fraction are set from bit 0 of
the pattern.

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  include/fpu/softfloat-helpers.h | 11 +++++++
  include/fpu/softfloat-types.h   | 10 ++++++
  fpu/softfloat-specialize.c.inc  | 55 ++++++++++++++++++++-------------
  3 files changed, 54 insertions(+), 22 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]