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) > -- Eduardo