Boxis R700 User Manual Page 161

  • Download
  • Add to my manuals
  • Print
  • Page
    / 392
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 160
ATI R700 Technology
ALU Instructions 9-63
Copyright © 2009 Advanced Micro Devices, Inc. All rights reserved.
Floating-Point 32-Bit To Floating-Point 64-Bit
Instructions
FLT32_TO_FLT64
Description Floating-point 32-bit convert to 64-bit floating-point. The instruction converts src0.X or
src0.Z to a 64-bit double-precision floating-point value and places the result in dst.YX or
dst.ZW, respectively. If the source value does fit in 32 bits, the low-order bits are used.
Using values outside the specified range produces undefined results.
A 32-bit NaN source is handled specially. The sign is copied, the mantissa is copied into bits
[52:30], and the exponent is forced to 0x7FF. The result for a NaN source is a NaN with the
same sign, and the single-precision mantissa is the MSB of the double-precision mantissa.
dst = src0;
mant = mantissa(src0)
exp = exponent(src0)
sign = sign(src0)
e = exp + (1023-127);
if (exp==0xFF) //src0 is inf or a NaN
{
If (mant!=0x0) //src0 is a NaN
{
dst = {sign, 0x7FF, {mant,29’b0}}; //29 low-order bits are zero
}
else //src0 is inf
{
dst = (sign) ? 0xFFF0000000000000 : 0x7FF0000000000000;
}
}
else if (exp==0x0) //src0 is zero or a denorm
{
dst = (sign) ? 0x8000000000000000 : 0x0;
}
else //src0 is a valid floating-point value
{
m = mant<<29;
m |= (e << 52);
m |= (sign << 63);
dst = m;
}
Coissue FLT32_TO_FLT64 is a two-slot instruction. The following coissue scenarios are possible:.
A single FLT32_TO_FLT64 instruction in slots 0 and 1, and any valid instructions in slots
2, 3, and 4.
A single FLT32_TO_FLT64 instruction in slots 2 and 3, and any valid instructions in slots
0, 1, and 4.
Two FLT32_TO_FLT64 instructions in slots 0, 1, 2, and 3,and any valid instruction in slot 4.
Table 9.2 Result of FLT32_TO_FLT64 Instruction
src0
-inf -F
1
1. F is a finite floating-point value.
-1.0 -denorm -0 +0 +denorm +1.0 +F
1
+inf NaN
-inf -F -1.0 -0.0 -0.0 +0.0 +0.0 +1.0 +F +inf NaN
2
2. The hardware propagates a 32-bit input NaN to the output. So if the input is a 32-bit -/+ signaling
NaN, the output is a 64-bit -/+ signaling NaN. A 32-bit -/+ quiet NaN returns a 64 bit -/+ quiet NaN.
A 32-bit 0xFFC00000 NaN returns a 64 bit NaN64 (0xFFF8000000000000).
Page view 160
1 2 ... 156 157 158 159 160 161 162 163 164 165 166 ... 391 392

Comments to this Manuals

No comments