Philips Semiconductors
PNX1300/01/02/11 DSPCPU Operations
PRELIMINARY SPECIFICATION
A-52
Floating-point compare less-than
pseudo-op for fgtr
SYNTAX
[ IF r
guard
] fles r
src1
r
src2
→
r
dest
FUNCTION
if
r
guard
then {
if
(float)r
src1
< (float)r
src2
then
r
dest
←
1
else
r
dest
←
0
}
ATTRIBUTES
Function unit
Operation code
Number of operands
Modifier
Modifier range
Latency
Issue slots
fcomp
144
2
No
—
1
3
DESCRIPTION
The
fles
operation is a pseudo operation transformed by the scheduler into an
fgtr
with the arguments
exchanged (
fles
’
s r
src1
is
fgtr
’
s r
src2
and vice versa). (Note: pseudo operations cannot be used in assembly
source files.)
The
fles
operation sets the destination register, r
dest
, to 1 if the first argument, r
src1
, is less than the second
argument, r
src2
; otherwise, r
dest
is set to 0. The arguments are treated as IEEE single-precision floating-point values;
the result is an integer. If an argument is denormalized, zero is substituted for the argument before computing the
comparison, and the IFZ flag in the PCSW is set. If
fles
causes an IEEE exception, the corresponding exception
flags in the PCSW are set. The PCSW exception flags are sticky: the flags can be set as a side-effect of any floating-
point operation but can only be reset by an explicit
writepcsw
operation. The update of the PCSW exception flags
occurs at the same time as r
dest
is written. If any other floating-point compute operations update the PCSW at the
same time, the net result in each exception flag is the logical OR of all simultaneous updates ORed with the existing
PCSW value for that exception flag.
The
flesflags
operation computes the exception flags that would result from an individual
fles
.
The
fles
operation optionally takes a guard, specified in r
guard
. If a guard is present, its LSB controls the
modification of the destination register. If the LSB of r
guard
is 1, r
dest
and the exception flags in PCSW are written;
otherwise, r
dest
is not changed and the operation does not affect the exception flags in PCSW.
EXAMPLES
Initial Values
Operation
Result
r30 = 0x40400000 (3.0), r40 = 0 (0.0)
r30 = 0x40400000 (3.0)
r10 = 0, r60 = 0x3f800000 (1.0),
r30 = 0x40400000 (3.0)
r20 = 1, r60 = 0x3f800000 (1.0),
r30 = 0x40400000 (3.0)
r30 = 0x40400000 (3.0),
r60 = 0x3f800000 (1.0)
r30 = 0x40400000 (3.0),
r61 = 0xffffffff (QNaN)
r50 = 0x7f800000 (+INF)
r55 = 0xff800000 (-INF)
r60 = 0x3f800000 (1.0),
r65 = 0x00400000 (5.877471754e-39)
r50 = 0x7f800000 (+INF)
fles r30 r40
→
r80
fles r30 r30
→
r90
IF r10 fles r60 r30
→
r100
r80
←
0
r90
←
0
no change, since guard is false
IF r20 fles r60 r30
→
r110
r110
←
1
fles r30 r60
→
r120
r120
←
0
fles r30 r61
→
r121
r121
←
0, INV flag set
fles r50 r55
→
r125
r125
←
0
fles r60 r65
→
r126
r126
←
0, IFZ flag set
fles r50 r50
→
r127
r127
←
0
SEE ALSO
iles
fgtr
flesflags
readpcsw
writepcsw
fles