On 10 June 2016 at 10:57, Aleksandar Markovic <aleksandar.marko...@rt-rk.com> wrote: > From: Aleksandar Markovic <aleksandar.marko...@imgtec.com> > > This patch modifies SoftFloat library so that it can be configured in > run-time in relation to the meaning of signaling NaN bit, while, at the > same time, strictly preserving its behavior on all existing platforms.
This doesn't compile: In file included from /home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat.c:106:0: /home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat-specialize.h: In function ‘commonNaNToFloat32’: /home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat-specialize.h:398:9: error: return makes integer from pointer without a cast [-Werror] return float32_default_nan; ^ In file included from /home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat.c:106:0: /home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat-specialize.h: In function ‘commonNaNToFloat64’: /home/petmay01/linaro/qemu-from-laptop/qemu/fpu/softfloat-specialize.h:816:9: error: return makes integer from pointer without a cast [-Werror] return float64_default_nan; ^ This is because a couple of changes currently in patch 2 should be in this patch: @@ -391,11 +391,12 @@ static float32 commonNaNToFloat32(commonNaNT a, float_status *status) return float32_default_nan(status); } - if ( mantissa ) + if (mantissa) { return make_float32( (((uint32_t)a.sign) << 31) | 0x7F800000 | (a.high >> 41)); - else - return float32_default_nan; + } else { + return float32_default_nan(status); + } } and @@ -807,13 +807,14 @@ static float64 commonNaNToFloat64(commonNaNT a, float_status *status) return float64_default_nan(status); } - if ( mantissa ) + if (mantissa) { return make_float64( (((uint64_t) a.sign) << 63) | LIT64(0x7FF0000000000000) | (a.high >> 12)); - else - return float64_default_nan; + } else { + return float64_default_nan(status); + } } Otherwise: Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> (As an aside, this patch reveals a bug in scripts/checkpatch.pl, which goes into an infinite loop if you try to run it on it.) thanks -- PMM