mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
softfloat: Inline floatx80 compare specializations
Replace the floatx80 compare specializations with inline functions that call the standard floatx80_compare{,_quiet} functions. Use bool as the return type. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
b7b1ac684f
commit
c6baf65000
2 changed files with 41 additions and 265 deletions
|
@ -689,14 +689,6 @@ floatx80 floatx80_mul(floatx80, floatx80, float_status *status);
|
|||
floatx80 floatx80_div(floatx80, floatx80, float_status *status);
|
||||
floatx80 floatx80_rem(floatx80, floatx80, float_status *status);
|
||||
floatx80 floatx80_sqrt(floatx80, float_status *status);
|
||||
int floatx80_eq(floatx80, floatx80, float_status *status);
|
||||
int floatx80_le(floatx80, floatx80, float_status *status);
|
||||
int floatx80_lt(floatx80, floatx80, float_status *status);
|
||||
int floatx80_unordered(floatx80, floatx80, float_status *status);
|
||||
int floatx80_eq_quiet(floatx80, floatx80, float_status *status);
|
||||
int floatx80_le_quiet(floatx80, floatx80, float_status *status);
|
||||
int floatx80_lt_quiet(floatx80, floatx80, float_status *status);
|
||||
int floatx80_unordered_quiet(floatx80, floatx80, float_status *status);
|
||||
FloatRelation floatx80_compare(floatx80, floatx80, float_status *status);
|
||||
FloatRelation floatx80_compare_quiet(floatx80, floatx80, float_status *status);
|
||||
int floatx80_is_quiet_nan(floatx80, float_status *status);
|
||||
|
@ -746,6 +738,47 @@ static inline int floatx80_is_any_nan(floatx80 a)
|
|||
return ((a.high & 0x7fff) == 0x7fff) && (a.low<<1);
|
||||
}
|
||||
|
||||
static inline bool floatx80_eq(floatx80 a, floatx80 b, float_status *s)
|
||||
{
|
||||
return floatx80_compare(a, b, s) == float_relation_equal;
|
||||
}
|
||||
|
||||
static inline bool floatx80_le(floatx80 a, floatx80 b, float_status *s)
|
||||
{
|
||||
return floatx80_compare(a, b, s) <= float_relation_equal;
|
||||
}
|
||||
|
||||
static inline bool floatx80_lt(floatx80 a, floatx80 b, float_status *s)
|
||||
{
|
||||
return floatx80_compare(a, b, s) < float_relation_equal;
|
||||
}
|
||||
|
||||
static inline bool floatx80_unordered(floatx80 a, floatx80 b, float_status *s)
|
||||
{
|
||||
return floatx80_compare(a, b, s) == float_relation_unordered;
|
||||
}
|
||||
|
||||
static inline bool floatx80_eq_quiet(floatx80 a, floatx80 b, float_status *s)
|
||||
{
|
||||
return floatx80_compare_quiet(a, b, s) == float_relation_equal;
|
||||
}
|
||||
|
||||
static inline bool floatx80_le_quiet(floatx80 a, floatx80 b, float_status *s)
|
||||
{
|
||||
return floatx80_compare_quiet(a, b, s) <= float_relation_equal;
|
||||
}
|
||||
|
||||
static inline bool floatx80_lt_quiet(floatx80 a, floatx80 b, float_status *s)
|
||||
{
|
||||
return floatx80_compare_quiet(a, b, s) < float_relation_equal;
|
||||
}
|
||||
|
||||
static inline bool floatx80_unordered_quiet(floatx80 a, floatx80 b,
|
||||
float_status *s)
|
||||
{
|
||||
return floatx80_compare_quiet(a, b, s) == float_relation_unordered;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Return whether the given value is an invalid floatx80 encoding.
|
||||
| Invalid floatx80 encodings arise when the integer bit is not set, but
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue