[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v4 1/9] softfloat: Implement run-time-configurab

From: Aleksandar Markovic
Subject: Re: [Qemu-devel] [PATCH v4 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit
Date: Wed, 13 Apr 2016 18:41:48 +0000

Hello, Eduardo,

I greatly appreciate your time spent on this matter and your unfailing 
attention to detail.

For Alpha and Xtensa, this is for sure, they will zero their CPU objects, as 
you hinted:

  162          cpu_class = object_class_by_name(TYPE("ev67"));
  163      }
  164:     cpu = ALPHA_CPU(object_new(object_class_get_name(cpu_class)));
  166      object_property_set_bool(OBJECT(cpu), true, "realized", NULL);

  125      }
  127:     cpu = XTENSA_CPU(object_new(object_class_get_name(oc)));
  128      env = &cpu->env;

So, I will remove their set_snan_bit_is_one(0) calls, as you suggested.

This leaves only ppc, s390x, and TriCore calling set_snan_bit_is_one(0) it this
patch series..

I'll take one more look at them tomorrow, and will get back to you.


From: Eduardo Habkost address@hidden
Sent: Tuesday, April 12, 2016 11:45 AM
To: Aleksandar Markovic
Cc: address@hidden; address@hidden; address@hidden; address@hidden; 
address@hidden; Maciej Rozycki; Petar Jovanovic; address@hidden; 
address@hidden; Aleksandar Markovic; address@hidden; address@hidden; 
address@hidden; Miodrag Dinic; address@hidden; address@hidden; Leon Alrae; 
address@hidden; address@hidden; address@hidden
Subject: Re: [Qemu-devel] [PATCH v4 1/9] softfloat: Implement 
run-time-configurable meaning of signaling NaN bit

On Tue, Apr 12, 2016 at 02:58:03PM +0200, Aleksandar Markovic wrote:
>   4) Updated code for all platforms to reflect changes in SoftFloat library.
>      This change is twofolds: it includes modifications of SoftFloat library
>      functions invocations, and an addition of invocation of function
>      set_snan_bit_is_one() during CPU initialization, with arguments that
>      are appropriate for each particular platform.
>      In order to be at the same time accurate in relation to floating point
>      arithmetics and consistent with a particular platform code, following
>      principle is adopted related to invocations of new function
>      set_snan_bit_is_one():
>      1. If a target platform doesn't use SoftFloat library, nothing is added.
>             (cris, lm32, moxie)
>      2. Else, if a target platform's signaling bit meaning is "1 is
>         signaling", explicit invocation of set_snan_bit_is_one(1) is added.
>             (mips, sh4, unicore32)
>               (for mips this will change in the second patch of this
>               series, but this very patch leaves mips features as
>               they currently are.)
>      3. Else, if a target platform explicitly sets other fields of its
>         float_status structure(s), explicit invocation of
>         set_snan_bit_is_one(0) is added.
>             (ppc, s390x, tricore)
>      4. Else, if a target platform doesn't explicitly set its structure
>         CPUXXXState, explicit invocation of set_snan_bit_is_one(0) is added.
>             (alpha, xtensa)

The CPU struct is zeroed by object_new() when the CPU object is
created, so the field is already set to 0 by default on all
architectures. You shouldn't need set_snan_bit_is_one(0) calls on
CPU initialization on any architecture.

>      5. For remaining cases, nothing is added. (Those cases explicitly set
>         their CPUXXXState/float_status structures to 0, and thus implicitly
>         perform set_snan_bit_is_one(0).)
>             (arm, i386, m68k, microblaze, openrisc, sparc)


reply via email to

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