Re: [Qemu-devel] [PATCH] tests/tcg: add float_madds test to multiarch

2019-09-14 Thread Richard Henderson
On 9/14/19 1:59 PM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 9/13/19 9:49 AM, Alex Bennée wrote: >>> +/* must be built with -O2 to generate fused op */ >>> +r = a * b + c; >> >> I would prefer to use fmaf() or __builtin_fmaf() here. >> >>

Re: [Qemu-devel] [PATCH] tests/tcg: add float_madds test to multiarch

2019-09-14 Thread Alex Bennée
Richard Henderson writes: > On 9/13/19 9:49 AM, Alex Bennée wrote: >> +/* must be built with -O2 to generate fused op */ >> +r = a * b + c; > > I would prefer to use fmaf() or __builtin_fmaf() here. > > Although you'll need to link with -lm just in case

Re: [Qemu-devel] [PATCH] tests/tcg: add float_madds test to multiarch

2019-09-14 Thread Richard Henderson
On 9/13/19 9:49 AM, Alex Bennée wrote: > +/* must be built with -O2 to generate fused op */ > +r = a * b + c; I would prefer to use fmaf() or __builtin_fmaf() here. Although you'll need to link with -lm just in case the target doesn't support an

Re: [Qemu-devel] [PATCH] tests/tcg: add float_madds test to multiarch

2019-09-13 Thread Paul Clarke
On 9/13/19 8:49 AM, Alex Bennée wrote: > +static float f32_numbers[] = { > +-SNANF, > +-NAN, > +-INFINITY, > +-FLT_MAX, > +-1.111E+31, > +-1.111E+30, > +-1.08700982e-12, > +-1.78051176e-20, > +-FLT_MIN, > +0.0, > +FLT_MIN, > +2.98023224e-08, > +

[Qemu-devel] [PATCH] tests/tcg: add float_madds test to multiarch

2019-09-13 Thread Alex Bennée
This is a generic floating point multiply and accumulate test for single precision floating point values. I've split of the common float functions into a helper library so additional tests can use the same common code. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/Makefile.target | 7 +-