ATI CTM Guide v. 1.01
© 2006 Advanced Micro Devices, Inc.
40 Note on Floating Point
3.5.5
Optimizations
Clearly, not all the possible combinations are explored above. The flexibility of the flow control instruction allows
for more creative flow control operations, or (more likely) optimizations.
One of the easiest optimizations makes use of the B_POP_CNT to merge consecutive ENDIF statements:
JUMP_FUNC A_OP B_POP_CNT
| JUMP_ANY | B_OP0 | B_ELSE
| | OP | | B_OP1 | | JUMP_ADDR
| | | | | | | | |
IF c 0x0f 0 JUMP NONE INCR NONE 0 0 1
[...]
IF c 0x0f 0 JUMP NONE INCR NONE 0 0 1
[...]
IF c 0x0f 0 JUMP NONE INCR NONE 0 0 1
[...]
ENDIF 0x00 1 JUMP NONE DECR NONE 1 0 0
ENDIF 0x00 1 JUMP NONE DECR NONE 1 0 0
ENDIF 0x00 1 JUMP NONE DECR NONE 1 0 0
Becomes
IF c 0x0f 0 JUMP NONE INCR NONE 0 0 ENDIF+1
[...]
IF c 0x0f 0 JUMP NONE INCR DECR 1 0 ENDIF+1
[...]
IF c 0x0f 0 JUMP NONE INCR DECR 2 0 ENDIF+1
[...]
ENDIF
ENDIF
ENDIF 0x00 1 JUMP NONE DECR NONE 3 0 0
3.6
Note on Floating Point
X1K FP is designed to be compliant with the Shader Model 3, which does not officially support IEEE special values
(denormal, infinity, NaN), and allows for leniency in various corner cases.
X1K FP strives to provide a more complete IEEE floating point implementation. X1K FP supports the IEEE 32-bit
floating point format, with 23 bits mantissa, 8 bits biased exponent (bias 127), and 1 bit sign. The X1K FP also
supports the special IEEE values (denormal, infinity, NaN), but there are some important caveats in the
implementation which are noted below. There is no distinction between an sNaN and a qNaN.
3.6.1
Pervasive Deviations from IEEE
The most pervasive caveat is that denormals are flushed to an appropriately signed zero throughout X1K FP. There
is no gradual underflow, and identities are not preserved for denormal values. This will be apparent in comparison
operations where a denormal is treated as equivalent to zero.
Summary of Contents for ATI CTM
Page 1: ...ATI CTM Guide Technical Reference Manual Version 1 01...
Page 6: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 2 Related Documents...
Page 48: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 44 Errata...
Page 54: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 50 Executable Files...