path: root/include/fpu/softfloat-helpers.h
diff options
authorPeter Maydell <peter.maydell@linaro.org>2020-05-19 19:18:41 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-05-19 19:18:41 +0100
commit956ae3e9265fd36cb1c487cb3c868e906bd55897 (patch)
tree62e00e715b0217099392f6de49b7b8a0b913f92f /include/fpu/softfloat-helpers.h
parentf2465433b43fb87766d79f42191607dac4aed5b4 (diff)
parent150c7a91ce7862bcaf7422f6038dcf0ba4a7eee3 (diff)
Merge remote-tracking branch 'remotes/rth/tags/pull-fpu-20200519' into staging
Misc cleanups # gpg: Signature made Tue 19 May 2020 16:51:38 BST # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-fpu-20200519: softfloat: Return bool from all classification predicates softfloat: Inline floatx80 compare specializations softfloat: Inline float128 compare specializations softfloat: Inline float64 compare specializations softfloat: Inline float32 compare specializations softfloat: Name compare relation enum softfloat: Name rounding mode enum softfloat: Change tininess_before_rounding to bool softfloat: Replace flag with bool softfloat: Use post test for floatN_mul Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/fpu/softfloat-helpers.h')
1 files changed, 14 insertions, 13 deletions
diff --git a/include/fpu/softfloat-helpers.h b/include/fpu/softfloat-helpers.h
index e0baf24c8f..735ed6b653 100644
--- a/include/fpu/softfloat-helpers.h
+++ b/include/fpu/softfloat-helpers.h
@@ -53,12 +53,13 @@ this code that are retained.
#include "fpu/softfloat-types.h"
-static inline void set_float_detect_tininess(int val, float_status *status)
+static inline void set_float_detect_tininess(bool val, float_status *status)
- status->float_detect_tininess = val;
+ status->tininess_before_rounding = val;
-static inline void set_float_rounding_mode(int val, float_status *status)
+static inline void set_float_rounding_mode(FloatRoundMode val,
+ float_status *status)
status->float_rounding_mode = val;
@@ -74,32 +75,32 @@ static inline void set_floatx80_rounding_precision(int val,
status->floatx80_rounding_precision = val;
-static inline void set_flush_to_zero(flag val, float_status *status)
+static inline void set_flush_to_zero(bool val, float_status *status)
status->flush_to_zero = val;
-static inline void set_flush_inputs_to_zero(flag val, float_status *status)
+static inline void set_flush_inputs_to_zero(bool val, float_status *status)
status->flush_inputs_to_zero = val;
-static inline void set_default_nan_mode(flag val, float_status *status)
+static inline void set_default_nan_mode(bool val, float_status *status)
status->default_nan_mode = val;
-static inline void set_snan_bit_is_one(flag val, float_status *status)
+static inline void set_snan_bit_is_one(bool val, float_status *status)
status->snan_bit_is_one = val;
-static inline int get_float_detect_tininess(float_status *status)
+static inline bool get_float_detect_tininess(float_status *status)
- return status->float_detect_tininess;
+ return status->tininess_before_rounding;
-static inline int get_float_rounding_mode(float_status *status)
+static inline FloatRoundMode get_float_rounding_mode(float_status *status)
return status->float_rounding_mode;
@@ -114,17 +115,17 @@ 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)
+static inline bool get_flush_to_zero(float_status *status)
return status->flush_to_zero;
-static inline flag get_flush_inputs_to_zero(float_status *status)
+static inline bool get_flush_inputs_to_zero(float_status *status)
return status->flush_inputs_to_zero;
-static inline flag get_default_nan_mode(float_status *status)
+static inline bool get_default_nan_mode(float_status *status)
return status->default_nan_mode;