Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 226

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

Since NaNs are unordered, comparison with NaNs (including LT) will return false. Hence
if the above code is implemented as:
ldf
L1: ldf
fmin
br.cloop
NaNs in the array (X) will be ignored.
If the value in the array X (loaded in f6) is a NaN, the new minimum value (in f5) will
remain unchanged, since the NaN will fail the.LT. comparison and fmin will return the
second argument – in this case the old minimum value in f5.
However, if the code is implemented as:
ldf
L1: ldf
fmin
br.cloop
NaNs in the array (X) will reset the minimum value.
Now, if the value in the array X (loaded in f6) is a NaN, the new minimum value (in f5)
will be set to the NaN, since the NaN will fail the.LT. comparison and fmin will return
the second argument – in this case the NaN in f6. In the next iteration, the new array
value (loaded in f6) will become the new minimum.
famin/famax perform the comparison on the absolute value of the input operands (i.e.
they ignore the sign bit) but otherwise operate in the same (non-commutative) way as
the fmin/fmax instructions.
6.3.6.3
Integer/Floating-point Conversion
Unsigned integers are converted to their equivalently valued floating-point
representations by simply moving the integer to the significand field of the
floating-point register using the setf.sig instruction. The resulting floating-point value
would be in its unnormal representation (unless the unsigned integer was greater than
63
2
).
Conversions from signed integers to floating-point and from floating-point to signed or
unsigned integers are accomplished by fcvt.xf and fcvt.fx/fcvt.fxu instructions
respectively. However, since signed integers are converted directly to their canonical
floating-point representations, they do not need to be normalized after conversion.
6.3.6.4
FP Subfield Handling
It is sometimes useful to assemble a floating-point value from its constituent fields.
Multiplication and division of floating-point values by powers of two, for example, can
be easily accomplished by appropriately adjusting the exponent. The Itanium
Volume 1, Part 2: Floating-point Applications
f5 = [r5], 8;;
f6 = [r5], 8
f5 = f6, f5
L1 ;;
f5 = [r5], 8;;
f6 = [r5], 8
f5 = f5, f6
L1 ;;
1:215

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents