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: target-alpha/cpu.c: 162 cpu_class = object_class_by_name(TYPE("ev67")); 163 } 164: cpu = ALPHA_CPU(object_new(object_class_get_name(cpu_class))); 165 166 object_property_set_bool(OBJECT(cpu), true, "realized", NULL); target-xtensa/helper.c: 125 } 126 127: cpu = XTENSA_CPU(object_new(object_class_get_name(oc))); 128 env = &cpu->env; 129 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. Yours, Aleksandar ________________________________________ From: Eduardo Habkost [ehabk...@redhat.com] Sent: Tuesday, April 12, 2016 11:45 AM To: Aleksandar Markovic Cc: qemu-devel@nongnu.org; pro...@gmail.com; kbast...@mail.uni-paderborn.de; mark.cave-ayl...@ilande.co.uk; ag...@suse.de; Maciej Rozycki; Petar Jovanovic; blauwir...@gmail.com; jcmvb...@gmail.com; Aleksandar Markovic; qemu-...@nongnu.org; qemu-...@nongnu.org; edgar.igles...@gmail.com; Miodrag Dinic; pbonz...@redhat.com; g...@mprc.pku.edu.cn; Leon Alrae; afaer...@suse.de; aurel...@aurel32.net; r...@twiddle.net 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) > -- Eduardo