Instructions
frsub | Reverse Floating Point Arithmetic Subtraction | ||
| frsub | rD, rA, rB | Reverse subtract |
R
0 1 0 1 1 0
rD
rA
rB
0 0 0 1 0 0 0 0 0 0 0
0 | 6 | 11 | 16 | 21 | 31 |
Description
The floating point value in rA is subtracted from the floating point value in rB and the result is placed into register rD.
Pseudocode
if isDnz(rA) or isDnz(rB) then (rD) ← 0xFFC00000
FSR[DO] ← 1 ESR[EC] ← 00110
else
if (isSigNaN(rA) or isSigNaN(rB) or (isPosInfinite(rA) and isPosInfinite(rB)) or
(isNegInfinite(rA) and isNegInfinite(rB))) then (rD) ← 0xFFC00000
FSR[IO] ← 1 ESR[EC] ← 00110
else
if isQuietNaN(rA) or isQuietNaN(rB) then (rD) ← 0xFFC00000
else
if
ESR[EC] ← 00110 else
if
ESR[EC] ← 00110 else
(rD) ← (rB) - (rA)
Registers Altered
•rD, unless an FP exception is generated, in which case the register is unchanged
•ESR[EC]
•FSR[IO,UF,OF,DO]
Latency
4 cycles
Note
This instruction is only available when the MicroBlaze parameter C_USE_FPU is set to 1.
MicroBlaze Processor Reference Guide | www.xilinx.com | 101 |
UG081 (v6.0) June 1, 2006 |
|