On 03/22/2018 04:11 AM, Emilio G. Cota wrote: > +#define GEN_FPU_ADDSUB(add_name, sub_name, soft_t, host_t, \ > + host_abs_func, min_normal) \ > + static inline __attribute__((always_inline)) soft_t \ > + fpu_ ## soft_t ## _addsub(soft_t a, soft_t b, bool subtract, \ > + float_status *s) \ > + { \ > + soft_t ## _input_flush2(&a, &b, s); \ > + if (likely((soft_t ## _is_normal(a) || soft_t ## _is_zero(a)) && \ > + (soft_t ## _is_normal(b) || soft_t ## _is_zero(b)) && \ > + s->float_exception_flags & float_flag_inexact && \ > + s->float_rounding_mode == float_round_nearest_even)) { \ > + host_t ha = soft_t ## _to_ ## host_t(a); \ > + host_t hb = soft_t ## _to_ ## host_t(b); \ > + host_t hr; \ > + soft_t r; \ > + \ > + if (subtract) { \ > + hb = -hb; \ > + } \ > + hr = ha + hb; \ > + r = host_t ## _to_ ## soft_t(hr); \ > + if (unlikely(soft_t ## _is_infinity(r))) { \ > + s->float_exception_flags |= float_flag_overflow; \ > + } else if (unlikely(host_abs_func(hr) <= min_normal)) { \ > + goto soft; \ > + } \ > + return r; \ > + } \ > + soft: \
Is there any especially good reason you want to not put this code into the normal softfloat function? Does it really many any measurable difference at all to force this code to be inlined into a helper? r~