
TM1300 Data Book
Philips Semiconductors
A-180
PRODUCT SPECIFICATION
Convert unsigned integer to oating-point with
rounding toward zero
SYNTAX
[ IF r
guard ] ufloatrz rsrc1
→ rdest
FUNCTION
if r
guard then {
r
dest
← (oat) ((unsigned long)rsrc1)
}
ATTRIBUTES
Function unit
falu
Operation code
119
Number of operands
1
Modier
No
Modier range
—
Latency
3
Issue slots
1, 4
DESCRIPTION
The ufloatrz operation converts the unsigned integer value in r
src1 to single-precision IEEE oating-point format
and writes the result into r
dest. Rounding is performed toward zero; the IEEE rounding mode bits in PCSW are
ignored. This is the preferred rounding mode for ANSI C. If ufloatrz causes an IEEE exception, such as inexact,
the corresponding exception ags in the PCSW are set. The PCSW exception ags are sticky: the ags can be set as
a side-effect of any oating-point operation but can only be reset by an explicit writepcsw operation. The update of
the PCSW exception ags occurs at the same time as r
dest is written. If any other oating-point compute operations
update the PCSW at the same time, the net result in each exception ag is the logical OR of all simultaneous updates
ORed with the existing PCSW value for that exception ag.
The ufloatrzflags operation computes the exception ags that would result from an individual ufloatrz.
The ufloatrz operation optionally takes a guard, specied in r
guard. If a guard is present, its LSB controls the
modication of the destination register. If the LSB of r
guard is 1, rdest and the exception ags in PCSW are written;
otherwise, r
dest is not changed and the operation does not affect the exception ags in PCSW.
EXAMPLES
Initial Values
Operation
Result
r30 = 3
ufloatrz r30
→ r100
r100
← 0x40400000 (3.0)
r40 = 0xffffffff (4294967295)
ufloatrz r40
→ r105
r105
← 0x4f7fffff (4.294967040e+9), INX ag set
r10 = 0, r50 = 0xfffffffd
IF r10 ufloatrz r50
→ r110
no change, since guard is false
r20 = 1, r50 = 0xfffffffd
IF r20 ufloatrz r50
→ r115
r115
← 0x4f7fffff (4.294967040e+9), INX ag set
r60 = 0x7fffffff (2147483647)
ufloatrz r60
→ r117
r117
← 0x4effffff (2.147483520e+9), INX ag set
r70 = 0x80000000 (2147483648)
ufloatrz r70
→ r120
r120
← 0x4f000000 (2.147483648e+9)
r80 = 0x7ffffff1 (2147483633)
ufloatrz r80
→ r122
r122
← 0x4effffff (2.147483520e+9), INX ag set
SEE ALSO
ifloatrz ifloat ufloat
ifixieee ufloatflags
ufloatrz