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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
.\" Copyright 2026 Andrew V.Kosteltsev (kx@radix-linux.su)
.\"
.\"
.TH real-flags 3 "September 15, 2026" "libmpu" "LibMPU Programmer's Manual"
.SH NAME
\fBreal-flags\fP, \fB__mpu_clear_rflags\fP, \fB__mpu_gtdom\fP, \fB__mpu_gtsng\fP, \fB__mpu_gtovf\fP, \fB__mpu_gtudf\fP, \fB__mpu_gttls\fP, \fB__mpu_gtpls\fP, \fB__mpu_gtind\fP, \fB__mpu_gtinx\fP, \fB__mpu_stdom\fP, \fB__mpu_stsng\fP, \fB__mpu_stovf\fP, \fB__mpu_studf\fP, \fB__mpu_sttls\fP, \fB__mpu_stpls\fP, \fB__mpu_stind\fP, \fB__mpu_stinx\fP, \fB__mpu_cldom\fP, \fB__mpu_clsng\fP, \fB__mpu_clovf\fP, \fB__mpu_cludf\fP, \fB__mpu_cltls\fP, \fB__mpu_clpls\fP, \fB__mpu_clind\fP, \fB__mpu_clinx\fP, \fB__mpu_cmdom\fP, \fB__mpu_cmsng\fP, \fB__mpu_cmovf\fP, \fB__mpu_cmudf\fP, \fB__mpu_cmtls\fP, \fB__mpu_cmpls\fP, \fB__mpu_cmind\fP, \fB__mpu_cminx\fP \- \fBLibMPU\fP real/math flag handling
.SH SYNOPSIS
.nf
.B #include <libmpu.h>
.PP
.B "void __mpu_clear_rflags( void );"
.B "void __mpu_clear_mflags( void );"
.PP
.B "int __mpu_gtdom( void );"
.B "int __mpu_gtsng( void );"
.B "int __mpu_gtovf( void );"
.B "int __mpu_gtudf( void );"
.B "int __mpu_gttls( void );"
.B "int __mpu_gtpls( void );"
.B "int __mpu_gtind( void );"
.B "int __mpu_gtinx( void );"
.PP
.B "void __mpu_stdom( void );"
.B "void __mpu_stsng( void );"
.B "void __mpu_stovf( void );"
.B "void __mpu_studf( void );"
.B "void __mpu_sttls( void );"
.B "void __mpu_stpls( void );"
.B "void __mpu_stind( void );"
.B "void __mpu_stinx( void );"
.PP
.B "void __mpu_cldom( void );"
.B "void __mpu_clsng( void );"
.B "void __mpu_clovf( void );"
.B "void __mpu_cludf( void );"
.B "void __mpu_cltls( void );"
.B "void __mpu_clpls( void );"
.B "void __mpu_clind( void );"
.B "void __mpu_clinx( void );"
.PP
.B "void __mpu_cmdom( void );"
.B "void __mpu_cmsng( void );"
.B "void __mpu_cmovf( void );"
.B "void __mpu_cmudf( void );"
.B "void __mpu_cmtls( void );"
.B "void __mpu_cmpls( void );"
.B "void __mpu_cmind( void );"
.B "void __mpu_cminx( void );"
.fi
.SH DESCRIPTION
\fBLibMPU\fP provides eight real/math flags:
.PP
.nf
\fBDOM\fP \- Domain Flag
\fBSNG\fP \- Singularity Flag
\fBOVF\fP \- Overflow Flag
\fBUDF\fP \- Underflow Flag
\fBTLS\fP \- TLOSS Flag (of lowest significant byte)
\fBPLS\fP \- PLOSS Flag
\fBIND\fP \- In-produsing operation Flag
\fBINX\fP \- Invalid operation Flag
.fi
.PP
The functions for each flag are grouped by operation below:
.nf
.sp
┌───────—┬───────────────┬───────────────┬───────────────┬───────────────┐
│ \fBFlag\fP │ \fBGet\fP │ \fBSet\fP │ \fBClear\fP │ \fBComplement\fP │
├───────—┼──────────────—┼──────────────—┼───────────────┼───────────────┤
│ \fBDOM\fP │ __mpu_gtdom() │ __mpu_stdom() │ __mpu_cldom() │ __mpu_cmdom() │
│ \fBSNG\fP │ __mpu_gtsng() │ __mpu_stsng() │ __mpu_clsng() │ __mpu_cmsng() │
│ \fBOVF\fP │ __mpu_gtovf() │ __mpu_stovf() │ __mpu_clovf() │ __mpu_cmovf() │
│ \fBUDF\fP │ __mpu_gtudf() │ __mpu_studf() │ __mpu_cludf() │ __mpu_cmudf() │
│ \fBTLS\fP │ __mpu_gttls() │ __mpu_sttls() │ __mpu_cltls() │ __mpu_cmtls() │
│ \fBPLS\fP │ __mpu_gtpls() │ __mpu_stpls() │ __mpu_clpls() │ __mpu_cmpls() │
│ \fBIND\fP │ __mpu_gtind() │ __mpu_stind() │ __mpu_clind() │ __mpu_cmind() │
│ \fBINX\fP │ __mpu_gtinx() │ __mpu_stinx() │ __mpu_clinx() │ __mpu_cminx() │
└────────┴───────────────┴───────────────┴───────────────┴───────────────┘
.fi
.PP
The \fBget\fP functions return the current value of the corresponding flag. The
\fBset\fP functions set it, the \fBclear\fP functions clear it, and the
\fBcomplement\fP functions invert its current value. All operations refer to
the \fBLibMPU\fP context of the current thread.
.PP
The \fB__mpu_clear_rflags()\fP function clears all real/math flags: \fBDOM\fP, \fBSNG\fP,
\fBOVF\fP, \fBUDF\fP, \fBTLS\fP, \fBPLS\fP, \fBIND\fP and \fBINX\fP.
.PP
The \fB__mpu_clear_mflags()\fP function clears the complete \fBLibMPU\fP flags
register, including both integer and real/math flags.
.SH RETURN VALUE
The get functions return \fB0\fP if the requested flag is clear and \fB1\fP if it is set.
The functions that set, clear or complement flags do not return a value.
.SH SEE ALSO
.BR integer\-flags(3),
.BR libmpu(7).
|