On 03/25/2016 05:50 AM, Aleksandar Markovic wrote:
+float16 float16_default_nan(float_status *status) {
{ on the next line.
+ return const_float64(LIT64( 0xFFF8000000000000 ));
Let's please fix the horrible formatting in this file as we touch the lines, please.
-#define floatx80_default_nan_high 0x7FFF -#define floatx80_default_nan_low LIT64(0xBFFFFFFFFFFFFFFF) -#else -#define floatx80_default_nan_high 0xFFFF -#define floatx80_default_nan_low LIT64( 0xC000000000000000 ) -#endif +uint16_t floatx80_default_nan_high(float_status *status) { +uint64_t floatx80_default_nan_low(float_status *status) {
Why do you need two separate functions for this?
+floatx80 floatx80_default_nan(float_status *status) {
Seems to me this one is good enough, and indeed preferable.
-#define float128_default_nan_high LIT64(0x7FFF7FFFFFFFFFFF) -#define float128_default_nan_low LIT64(0xFFFFFFFFFFFFFFFF)
...
+float128 float128_default_nan(float_status *status) {
Likewise.
diff --git a/target-alpha/cpu.c b/target-alpha/cpu.c index 2eab060..1714387 100644 --- a/target-alpha/cpu.c +++ b/target-alpha/cpu.c @@ -277,6 +277,8 @@ static void alpha_cpu_initfn(Object *obj) #endif env->lock_addr = -1; env->fen = 1; + + set_snan_bit_is_one(0, &env->fp_status);
We've just done a memset of (most of) the entire cpu struct. We don't need to re-initialize this field to zero here. Same with most of the other cpus.
r~