10 #define FE_DIVBYZERO 4 14 #define FE_UNDERFLOW 16 18 #define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) 22 #define FE_TONEAREST 0 27 #define FE_TOWARDZERO 3 153 #define FE_DFL_ENV (env) 261 #define __FPU_TAG_WORD_VALID 0 264 #define __FPU_TAG_ZERO 1 267 #define __FPU_TAG_SPECIAL 2 270 #define __FPU_TAG_EMPTY 3 273 #define __FPU_PRECISION_SINGLE 0 274 #define __FPU_PRECISION_DOUBLE 1 276 #define __FPU_PRECISION_EXTENDED 3 280 #define __FPU_ROUNDING_NEAREST_EVEN 0 281 #define __FPU_ROUNDING_FLOOR 1 283 #define __FPU_ROUNDING_CEIL 2 285 #define __FPU_ROUNDING_TRUNCATE 3 289 #define __FPU_INFINITY_CONTROL_PROJECTIVE 0 290 #define __FPU_INFINITY_CONTROL_AFFINE 1 unsigned char overflow
Overflow exception flag.
Definition: fenv.h:41
unsigned char condition_code_3
Condition code 3.
Definition: fenv.h:87
int feraiseexcept(int excepts)
Raise FPU exception flags.
Definition: feraiseexcept.c:3
unsigned char error_summary_status
Error summary status.
Definition: fenv.h:77
int fegetenv(fenv_t *envp)
Get entire environment.
Definition: fegetenv.c:3
int feholdexcept(fenv_t *envp)
Hold floating-point exceptions.
Definition: feholdexcept.c:3
int feclearexcept(int excepts)
Clear FPU exception flags.
Definition: feclearexcept.c:3
fcontrol_t control_word
FPU control word.
Definition: fenv.h:120
void __FPU_write_control_word(fcontrol_t control_word)
Write FPU control word.
Definition: __FPU_write_control_word.c:3
unsigned char busy
Indicates if FPU is busy.
Definition: fenv.h:89
unsigned char condition_code_1
Condition code 1.
Definition: fenv.h:81
unsigned short unused2
Unused.
Definition: fenv.h:126
unsigned short unused4
Unused.
Definition: fenv.h:144
unsigned short unused1
Unused.
Definition: fenv.h:122
const fenv_t * env
Pointer to environment.
Definition: fenv.c:3
Type represent state of floating point environment.
Definition: fenv.h:117
fexcept_t status_word
FPU status word.
Definition: fenv.h:124
fexcept_t __FPU_read_status_word()
Read FPU status word.
Definition: __FPU_read_status_word.c:3
unsigned char tag2
Describes content of 3rd register.
Definition: fenv.h:101
double round(double x)
Round to nearest.
Definition: round.c:3
unsigned char rounding_control
Rounding control flag.
Definition: fenv.h:51
unsigned char tag5
Describes content of 6th register.
Definition: fenv.h:107
unsigned char zero_divide
Zero divide exception.
Definition: fenv.h:67
unsigned short unused3
Unused.
Definition: fenv.h:130
unsigned char five_zeros
Five zeros.
Definition: fenv.h:138
int fegetround(void)
Get current rounding direction.
Definition: fegetround.c:3
fcontrol_t __FPU_read_control_word()
Read FPU control word.
Definition: __FPU_read_control_word.c:3
void __FPU_clear_exceptions()
Clear all FPU exceptions.
Definition: __FPU_clear_exceptions.c:3
unsigned int data_pointer_offset
Data pointer offset.
Definition: fenv.h:140
unsigned char tag0
Describes content of 1st register.
Definition: fenv.h:97
unsigned char zero_divide
Zero divide exception flag.
Definition: fenv.h:39
unsigned short opcode
Last used opcode.
Definition: fenv.h:136
Tag words.
Definition: fenv.h:94
unsigned char infinity_control
Infinity control flag.
Definition: fenv.h:53
Type represent state of floating point status word.
Definition: fenv.h:60
int fesetexceptflag(const fexcept_t *flagp, int excepts)
Set exception flags.
Definition: fesetexceptflag.c:3
unsigned char
Dummy field to align.
Definition: fenv.h:47
fenv_t __FPU_read_environment()
Read FPU environment.
Definition: __FPU_read_environment.c:3
unsigned char condition_code_0
Condition code 0.
Definition: fenv.h:79
unsigned char stack_fault
Stack fault flag.
Definition: fenv.h:75
unsigned char precision_control
Precision control flag.
Definition: fenv.h:49
unsigned char condition_code_2
Condition code 2.
Definition: fenv.h:83
int fegetexceptflag(fexcept_t *flagp, int excepts)
Get exception flags.
Definition: fegetexceptflag.c:3
void __FPU_write_environment(fenv_t environment)
Write FPU environment.
Definition: __FPU_write_environment.c:3
unsigned char tag6
Describes content of 7th register.
Definition: fenv.h:109
unsigned short data_pointer_selector
Data pointer selector.
Definition: fenv.h:142
int feupdateenv(const fenv_t *envp)
Update floating-point environment.
Definition: feupdateenv.c:3
ftag_word_t tag_word
FPU tag word.
Definition: fenv.h:128
unsigned char top_of_stack_pointer
Points to top of stack pointer.
Definition: fenv.h:85
unsigned char precision
Precision exception.
Definition: fenv.h:73
unsigned char underflow
Underflow exception flag.
Definition: fenv.h:43
unsigned char tag7
Describes content of 8th register.
Definition: fenv.h:111
unsigned char overflow
Overflow exception.
Definition: fenv.h:69
unsigned char underflow
Underflow exception.
Definition: fenv.h:71
unsigned char tag3
Describes content of 4th register.
Definition: fenv.h:103
Type represent state of floating point control word.
Definition: fenv.h:32
int fesetround(int round)
Set rounding direction.
Definition: fesetround.c:3
int fesetenv(const fenv_t *envp)
Set entire environment.
Definition: fesetenv.c:3
unsigned char denormalized_operand
Denormalized operand exception flag.
Definition: fenv.h:37
unsigned char tag1
Describes content of 2nd register.
Definition: fenv.h:99
unsigned char invalid_operation
Invalid operation exception.
Definition: fenv.h:63
unsigned char invalid_operation
Invalid operation exception flag.
Definition: fenv.h:35
int fetestexcept(int excepts)
Test for floating-point exceptions.
Definition: fetestexcept.c:3
unsigned char precision
Precision exception flag.
Definition: fenv.h:45
unsigned short instruction_pointer_selector
Instruction pointer selector.
Definition: fenv.h:134
unsigned int instruction_pointer_offset
Instruction pointer offset.
Definition: fenv.h:132
unsigned char denormalized_operand
Denormalized operand exception.
Definition: fenv.h:65
unsigned char tag4
Describes content of 5th register.
Definition: fenv.h:105