p->frac_lo &= ~round_mask;
}
fracN(shr)(p, frac_shift);
- } else if (get_flush_to_zero(s) &&
- s->ftz_detection == float_ftz_before_rounding) {
+ } else if (get_flush_to_zero(s) && get_ftz_before_rounding(s)) {
flags |= float_flag_output_denormal_flushed;
p->cls = float_class_zero;
exp = 0;
if (is_tiny) {
if (get_flush_to_zero(s)) {
- assert(s->ftz_detection == float_ftz_after_rounding);
+ assert(!get_ftz_before_rounding(s));
flags |= float_flag_output_denormal_flushed;
p->cls = float_class_zero;
exp = 0;
return status->tininess_before_rounding;
}
+static inline bool get_ftz_before_rounding(const float_status *status)
+{
+ return status->ftz_before_rounding;
+}
+
/*----------------------------------------------------------------------------
| For the deconstructed floating-point with fraction FRAC, return true
| if the fraction represents a signalling NaN; otherwise false.
status->flush_inputs_to_zero = val;
}
-static inline void set_float_ftz_detection(FloatFTZDetection d,
- float_status *status)
+static inline void set_float_ftz_detection(bool val, float_status *status)
{
- status->ftz_detection = d;
+ status->ftz_before_rounding = val;
}
static inline void set_default_nan_mode(bool val, float_status *status)
return status->float_snan_rule;
}
-static inline FloatFTZDetection get_float_ftz_detection(const float_status *status)
-{
- return status->ftz_detection;
-}
-
#endif /* SOFTFLOAT_HELPERS_H */
* configure it matches the default for tininess_before_rounding
* (i.e. "after rounding").
*/
-typedef enum __attribute__((__packed__)) {
- float_ftz_after_rounding = 0,
- float_ftz_before_rounding = 1,
-} FloatFTZDetection;
+#define float_ftz_after_rounding false
+#define float_ftz_before_rounding true
/*
* floatx80 is primarily used by x86 and m68k, and there are
/* should denormalised results go to zero and set output_denormal_flushed? */
bool flush_to_zero;
/* do we detect and flush denormal results before or after rounding? */
- FloatFTZDetection ftz_detection;
+ bool ftz_before_rounding;
/* should denormalised inputs go to zero and set input_denormal_flushed? */
bool flush_inputs_to_zero;
bool default_nan_mode;