mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-28 06:16:59 +00:00
fpu/softfloat: Make is_nan et al available to softfloat-specialize.h
We will need these helpers within softfloat-specialize.h, so move the definitions above the include. After specialization, they will not always be used so mark them to avoid the Werror. Backports commit 247d1f2190c5530fd18fe92a145d0a1985fca4e4 from qemu
This commit is contained in:
parent
79a4c4ed0f
commit
7995525f68
|
@ -181,6 +181,23 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
float_class_snan,
|
||||
} FloatClass;
|
||||
|
||||
/* Simple helpers for checking if what NaN we have */
|
||||
/* Simple helpers for checking if, or what kind of, NaN we have */
|
||||
static inline bool is_nan(FloatClass c)
|
||||
{
|
||||
return unlikely(c >= float_class_qnan);
|
||||
}
|
||||
|
||||
static inline bool is_snan(FloatClass c)
|
||||
{
|
||||
return c == float_class_snan;
|
||||
}
|
||||
|
||||
static inline bool is_qnan(FloatClass c)
|
||||
{
|
||||
return c == float_class_qnan;
|
||||
}
|
||||
|
||||
/*
|
||||
* Structure holding all of the decomposed parts of a float. The
|
||||
* exponent is unbiased and the fraction is normalized. All
|
||||
|
@ -536,20 +553,6 @@ static float64 float64_round_pack_canonical(FloatParts p, float_status *s)
|
|||
return float64_pack_raw(round_canonical(p, s, &float64_params));
|
||||
}
|
||||
|
||||
/* Simple helpers for checking if what NaN we have */
|
||||
static bool is_nan(FloatClass c)
|
||||
{
|
||||
return unlikely(c >= float_class_qnan);
|
||||
}
|
||||
static bool is_snan(FloatClass c)
|
||||
{
|
||||
return c == float_class_snan;
|
||||
}
|
||||
static bool is_qnan(FloatClass c)
|
||||
{
|
||||
return c == float_class_qnan;
|
||||
}
|
||||
|
||||
static FloatParts return_nan(FloatParts a, float_status *s)
|
||||
{
|
||||
switch (a.cls) {
|
||||
|
|
Loading…
Reference in a new issue