1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51#ifndef SOFTFLOAT_HELPERS_H
52#define SOFTFLOAT_HELPERS_H
53
54#include "fpu/softfloat-types.h"
55
56static inline void set_float_detect_tininess(bool val, float_status *status)
57{
58 status->tininess_before_rounding = val;
59}
60
61static inline void set_float_rounding_mode(FloatRoundMode val,
62 float_status *status)
63{
64 status->float_rounding_mode = val;
65}
66
67static inline void set_float_exception_flags(int val, float_status *status)
68{
69 status->float_exception_flags = val;
70}
71
72static inline void set_floatx80_rounding_precision(FloatX80RoundPrec val,
73 float_status *status)
74{
75 status->floatx80_rounding_precision = val;
76}
77
78static inline void set_flush_to_zero(bool val, float_status *status)
79{
80 status->flush_to_zero = val;
81}
82
83static inline void set_flush_inputs_to_zero(bool val, float_status *status)
84{
85 status->flush_inputs_to_zero = val;
86}
87
88static inline void set_default_nan_mode(bool val, float_status *status)
89{
90 status->default_nan_mode = val;
91}
92
93static inline void set_snan_bit_is_one(bool val, float_status *status)
94{
95 status->snan_bit_is_one = val;
96}
97
98static inline void set_use_first_nan(bool val, float_status *status)
99{
100 status->use_first_nan = val;
101}
102
103static inline void set_no_signaling_nans(bool val, float_status *status)
104{
105 status->no_signaling_nans = val;
106}
107
108static inline bool get_float_detect_tininess(float_status *status)
109{
110 return status->tininess_before_rounding;
111}
112
113static inline FloatRoundMode get_float_rounding_mode(float_status *status)
114{
115 return status->float_rounding_mode;
116}
117
118static inline int get_float_exception_flags(float_status *status)
119{
120 return status->float_exception_flags;
121}
122
123static inline FloatX80RoundPrec
124get_floatx80_rounding_precision(float_status *status)
125{
126 return status->floatx80_rounding_precision;
127}
128
129static inline bool get_flush_to_zero(float_status *status)
130{
131 return status->flush_to_zero;
132}
133
134static inline bool get_flush_inputs_to_zero(float_status *status)
135{
136 return status->flush_inputs_to_zero;
137}
138
139static inline bool get_default_nan_mode(float_status *status)
140{
141 return status->default_nan_mode;
142}
143
144#endif
145