Sun Microelectronics
211
13. UltraSPARC Extended Instructions
13.5.4.4 FMUL8SUx16
FMUL8SUx16 multiplies the upper 8 bits of each 16-bit signed value in rs1 by the
corresponding signed 16-bit fixed-point signed integer in rs2. It rounds the 24-bit
product (to nearest) and then stores the upper 16 bits of the result into the corre-
sponding 16-bit field of the rd register. If the product is exactly half way between
two integers, the result is rounded towards positive infinity. Figure 13-11 illus-
trates the operation.
Figure 13-11
FMUL8SUx16 Operation
13.5.4.5 FMUL8ULx16
FMUL8ULx16 multiplies the unsigned lower 8 bits of each 16-bit value in rs1 by
the corresponding fixed point signed integer in rs2. Each 24-bit product is sign-
extended to 32 bits. The upper 16-bits of the sign extended value are rounded to
nearest and stored in the corresponding 16 bits of the rd register. In the case that
the result is exactly half way between two integers, the result is rounded towards
positive infinity. The operation is illustrated in Figure 13-12.
Code Example 13-1 16-bit x 16-bit
→
16-bit Multiply
fmul8sux16 %f0, %f2, %f4
fmul8ulx16 %f0, %f2, %f6
fpadd16
%f4, %f6, %f8
3
rd
rs1
1
1
5
2
3
0
7
rs2
*
*
*
*
5
5
3
9
4
7
6
3
msb
msb
msb
msb
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com