On 18.04.2011, at 21:23, Aurelien Jarno wrote: > Use the new softfloat float32_min() and float32_max() to implement the > vminfp and vmaxfp instructions. > > Cc: Alexander Graf <ag...@suse.de> > Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> > --- > target-ppc/op_helper.c | 16 +++++----------- > 1 files changed, 5 insertions(+), 11 deletions(-) > > diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c > index 9aa108e..9058d78 100644 > --- a/target-ppc/op_helper.c > +++ b/target-ppc/op_helper.c > @@ -2369,22 +2369,16 @@ VMINMAX(uw, u32) > #undef VMINMAX_DO > #undef VMINMAX > > -#define VMINMAXFP(suffix, rT, rF) \ > - void helper_v##suffix (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ > +#define VMINMAXFP(suffix) \ > + void helper_v##suffix##fp (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)\ > { \ > int i; \ > for (i = 0; i < ARRAY_SIZE(r->f); i++) { \ > - HANDLE_NAN2(r->f[i], a->f[i], b->f[i]) { \ > - if (float32_lt_quiet(a->f[i], b->f[i], &env->vec_status)) { \ > - r->f[i] = rT->f[i]; \ > - } else { \ > - r->f[i] = rF->f[i]; \ > - } \ > - } \ > + r->f[i] = float32_##suffix(a->f[i], b->f[i], &env->vec_status); \
Now that you've removed all the magic from the macro, it'd probably be easier to read if you open coded it, no? :) Alex