mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
fpu: move inline helpers into a separate header
There are a bunch of users of the inline helpers who do not need access to the entire softfloat API. Move those inline helpers into a new header file which can be included without bringing in the rest of the world. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
472038ccf5
commit
e34c47ea3f
2 changed files with 133 additions and 62 deletions
|
@ -93,68 +93,7 @@ enum {
|
|||
};
|
||||
|
||||
#include "fpu/softfloat-types.h"
|
||||
|
||||
static inline void set_float_detect_tininess(int val, float_status *status)
|
||||
{
|
||||
status->float_detect_tininess = val;
|
||||
}
|
||||
static inline void set_float_rounding_mode(int val, float_status *status)
|
||||
{
|
||||
status->float_rounding_mode = val;
|
||||
}
|
||||
static inline void set_float_exception_flags(int val, float_status *status)
|
||||
{
|
||||
status->float_exception_flags = val;
|
||||
}
|
||||
static inline void set_floatx80_rounding_precision(int val,
|
||||
float_status *status)
|
||||
{
|
||||
status->floatx80_rounding_precision = val;
|
||||
}
|
||||
static inline void set_flush_to_zero(flag val, float_status *status)
|
||||
{
|
||||
status->flush_to_zero = val;
|
||||
}
|
||||
static inline void set_flush_inputs_to_zero(flag val, float_status *status)
|
||||
{
|
||||
status->flush_inputs_to_zero = val;
|
||||
}
|
||||
static inline void set_default_nan_mode(flag val, float_status *status)
|
||||
{
|
||||
status->default_nan_mode = val;
|
||||
}
|
||||
static inline void set_snan_bit_is_one(flag val, float_status *status)
|
||||
{
|
||||
status->snan_bit_is_one = val;
|
||||
}
|
||||
static inline int get_float_detect_tininess(float_status *status)
|
||||
{
|
||||
return status->float_detect_tininess;
|
||||
}
|
||||
static inline int get_float_rounding_mode(float_status *status)
|
||||
{
|
||||
return status->float_rounding_mode;
|
||||
}
|
||||
static inline int get_float_exception_flags(float_status *status)
|
||||
{
|
||||
return status->float_exception_flags;
|
||||
}
|
||||
static inline int get_floatx80_rounding_precision(float_status *status)
|
||||
{
|
||||
return status->floatx80_rounding_precision;
|
||||
}
|
||||
static inline flag get_flush_to_zero(float_status *status)
|
||||
{
|
||||
return status->flush_to_zero;
|
||||
}
|
||||
static inline flag get_flush_inputs_to_zero(float_status *status)
|
||||
{
|
||||
return status->flush_inputs_to_zero;
|
||||
}
|
||||
static inline flag get_default_nan_mode(float_status *status)
|
||||
{
|
||||
return status->default_nan_mode;
|
||||
}
|
||||
#include "fpu/softfloat-helpers.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Routine to raise any or all of the software IEC/IEEE floating-point
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue