Floating point unit
81
Programming the MIPS32® 74K™ Core Family, Revision 02.14
The FP control/status registers (FCSR, FCCR, FEXR, FENR)
shows all these registers and their bits
Where:
FCC7-0
: the floating point condition codes: set by compare instructions, tested by appropriate branch and conditional
move instructions.
FS/FO/FN
: options to avoid "unimplemented" exceptions when handling tiny ("denormalized") numbers
20
. They do so
at the cost of IEEE compatibility, by replacing the very small number with either zero or with the nearest nonzero
quantity with a normalized representation.
The
FO
(“flush override”) bit causes all tiny operand and result values to be replaced.
The
FS
(“flush to zero”) bit causes all tiny operand and result values to be replaced, but additionally does the same
substitution for any tiny intermediate value in a multiply-add instruction. This is provided both for legacy reasons,
and in case you don’t like the idea that the result of a multiply/add can change according to whether you use the fused
instruction or a separate multiply and add.
The
FN
bit (“flush to nearest”) bit causes all result values to be replaced with somewhat better accuracy than you
usually get with
FS
: the result is either zero or a smallest-normalized-number, whichever is closer. Without FN set
you can only replace your tiny number with a nonzero result if the “RP” or “RM” rounding modes (round towards
more positive, round towards more negative) are in effect.
For full IEEE-compatibility you must set
FCSR[FS,FO,FN]
== [0,0,0]
.
To get the best performance compatible with a guarantee of no “unimplemented” exceptions, set
FCSR[FS,FO,FN]
== [1,1,1]
.
Just occasionally for legacy applications developed with older MIPS CPUs which did not have the
FO
and
FN
options,
you might set
FCSR[FS,FO,FN]
== [1,0,0]
.
E
: (often shown in documents as part of the
Cause
array) is a status bit indicating that the last FP instruction caused an
"unimplemented" exception, as discussed in
Section 6.4.2, "FPU “unimplemented” exceptions (and how to avoid
.
31
25 24
23
22
21 20
18 17 16
12 11 8 7 6
3
2 1
0
FCSR
FCC7-1
FS FCC0 FO FN
0
E
Cause
Enables
Flags
RM
FCCR
0
FCC7-0
FEXR
0
E
Cause
0
Flags
0
FENR
0
Enables
0
FS RM
Figure 6.3 Floating point control/status register and alternate views
20. See
for an explanation of “normalized” and “denormalized”.
Содержание MIPS32 74K Series
Страница 1: ...Document Number MD00541 Revision 02 14 March 30 2011 Programming the MIPS32 74K Core Family...
Страница 10: ...Programming the MIPS32 74K Core Family Revision 02 14 10...
Страница 20: ...1 4 A brief guide to the 74K core implementation Programming the MIPS32 74K Core Family Revision 02 14 20...
Страница 28: ...2 2 PRId register identifying your CPU type Programming the MIPS32 74K Core Family Revision 02 14 28...
Страница 54: ...3 8 The TLB and translation Programming the MIPS32 74K Core Family Revision 02 14 54...
Страница 83: ......
Страница 86: ...6 5 FPU pipeline and instruction timing Programming the MIPS32 74K Core Family Revision 02 14 86...
Страница 101: ...The MIPS32 DSP ASE 101 Programming the MIPS32 74K Core Family Revision 02 14...
Страница 134: ...8 4 Performance counters Programming the MIPS32 74K Core Family Revision 02 14 134...
Страница 154: ...C 3 FPU changes in Release 2 of the MIPS32 Architecture Programming the MIPS32 74K Core Family Revision 02 14 154...