Auxiliary Processing Units (APUs)
PowerPC e500 Core Family Reference Manual, Rev. 1
Freescale Semiconductor
10-21
efscfd
efscfd
Floating-Point Single-Precision Convert from Double-Precision
efscfd
rD,rB
FP64format f;
FP32format result;
f
←
rB
0:63
if (f
exp
= 0) & (f
frac
= 0)) then
result
←
f
sign
||
31
0
// signed zero value
else if Isa64NaNorInfinity(f) then
SPEFSCR
FINV
←
1
result
←
f
sign
|| 0b11111110 ||
23
1
// max value
else if Isa64Denorm(f) then
SPEFSCR
FINV
←
1
result
←
f
sign
||
31
0
else
unbias
←
f
exp
- 1023
if unbias > 127 then
result
←
f
sign
|| 0b11111110 ||
23
1
// max value
SPEFSCR
FOVF
←
1
else if unbias < -126 then
result
←
f
sign
|| 0b00000001 ||
23
0
// min value
SPEFSCR
FUNF
←
1
else
result
sign
←
f
sign
result
exp
←
127
result
frac
←
f
frac[0:22]
guard
←
f
frac[23]
sticky
←
(f
frac[24:51]
≠
0)
result
←
Round32(result, LOWER, guard, sticky)
SPEFSCR
FG
←
guard
SPEFSCR
FX
←
sticky
if guard | sticky then
SPEFSCR
FINXS
←
1
rD
32:63
←
result
The double-precision floating-point value in rB is converted to a single-precision floating-point
value using the current rounding mode and the result is placed into the low element of rD.
Exceptions:
If the rB value is Infinity, Denorm, or NaN, SPEFSCR[FINV] is set. If SPEFSCR[FINVE] is set,
an interrupt is taken and rD is not updated. Otherwise, if overflow occurs, SPEFSCR[FOVF] is
set; if underflow occurs, SPEFSCR[FUNF] is set. If underflow or overflow exceptions are enabled
and the corresponding bit is set, an interrupt is taken. If an interrupts is taken, rD is not updated.
If the result of this instruction is inexact or if an overflow occurs but overflow exceptions are
disabled, and no other interrupt is taken, SPEFSCR[FINXS] is set. If the floating-point inexact
exception is enabled, a floating-point round interrupt is taken, rD is updated with the truncated
result, FG and FX are updated so the interrupt handler can perform rounding.
FG and FX are cleared if an overflow, underflow, or invalid operation/input error is signaled,
regardless of enabled exceptions.
0
5
6
10 11
15 16
20 21
31
0
0
0
1
0
0
rD
0
0
0
0
0
rB
0
1
0
1
1
0
0
1
1
1
1
Summary of Contents for PowerPC e500 Core
Page 1: ...PowerPC e500 Core Family Reference Manual Supports e500v1 e500v2 E500CORERM Rev 1 4 2005...
Page 36: ...PowerPC e500 Core Family Reference Manual Rev 1 xxxvi Freescale Semiconductor...
Page 38: ...PowerPC e500 Core Family Reference Manual Rev 1 Part I 2 Freescale Semiconductor...
Page 332: ...PowerPC e500 Core Family Reference Manual Rev 1 Part II 2 Freescale Semiconductor...
Page 530: ...Opcode Listings PowerPC e500 Core Family Reference Manual Rev 1 D 50 Freescale Semiconductor...
Page 534: ...PowerPC e500 Core Family Reference Manual Rev 1 E 4 Freescale Semiconductor Revision History...