Sun Microelectronics
202
UltraSPARC User’s Manual
Figure 13-3
FPACK16 Operation
This operation, illustrated in Figure 13-3, is carried out as follows:
1.
Left shift the value in rs2 by the number of bits in the GSR.scale_factor,
while maintaining clipping information.
2.
Truncate and clip to an 8-bit unsigned integer starting at the bit
immediately to the left of the implicit binary point (i.e. between bits 7 and
6 for each 16-bit word). Truncation is performed to convert the scaled value
into a signed integer (that is, round toward negative infinity). If the
resulting value is negative (that is, the MSB is set), zero is delivered as the
clipped value. If the value is greater than 255, then 255 is delivered.
Otherwise the scaled value is the final result.
3.
Store the result in the corresponding byte in the 32-bit rd register.
1
rs2
rd
7
0
1
0
3
6
7
implicit binary pt
0
5
5
1
4
3
0
GSR.scale_factor
0100
1
rs2
rd
7
0
1
0
9
6
implicit binary pt
0
5
5
3
0
GSR.scale_factor
1010
1
0
0
0
0
0
0
0
0
0
0
0
1
4
2
5
1
9
rs2
rd
7
23
15
31
47
63
0
0
0
0
7
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com