
=
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed, distributed or reproduced without permission from Winbond.
153
Versi on 0. 4, March/2000
APPENDIX C : MULTIPLIER EXTENDED INSTRUCTION SET
Halfword Multiply
Format:
0:5 6:10 11:15 16:18 19 20
21:25 26 27:31
05
r2
r1
~
r
1
01
6 5 5 3 1
1 5 1 5
Purpose:
To multiply corresponding 16-bit sign halfword of two general registers.
Description:
The corresponding 16-bit sign halfwords of GR[r1] and GR[r2] are arithme-tically
multiplied. The multiply result is placed in 32-bit LO accumulate register and GR[t] register. The
bit in AIR[25] which indicates operating in integer or fraction mode determines the high-order or
low-order 16 bits of GR[r1], GR[r2] will be as the two operands.
The completer,
cmplt
, determines multiplication in rounding or unrounding mode is
performed, the completer specified by
"
r
"
indicates operating in rounding mode, the multiply
result can be truncated the lower 16 bits when the least 16th bit is zero. IF the the least 16th bit is
one, add one with the high-order 48 bits and truncate the low-order 16 bits.
Operation:
Integer mode operation (AIR[25] = 0) :
switch (cmplt) {
case r : (r=1, rounding mode){
GR[t]{0:31}
sign_ext(GR[r2]{16:31})+16h8000);
LO{0:31}
sign_ext(GR[r2]{16:31})+16h8000);
break;
}
default : (r=0, unrounding mode){
GR[t]{0:31}
←
(sign_ext(GR[r1]{16:31}) * sign_ext(GR[r2]{16:31}));
LO{0:31}
←
(sign_ext(GR[r1]{16:31}) * sign_ext(GR[r2]{16:31}));
break;
}
}
Fraction mode operation (AIR[25] = 1):
switch(cmplt){
case r : (r=1, rounding mode){
GR[t]{0:31}
←
(lshift(sign_ext(GR[r1]{0:15}) * sign_ext(GR[r2]{0:15}), 1)
+16h8000);
HMUL
HMUL, cmplt r1,r2,t
~
t
←
(sign_ext(GR[r1]{16:31})
*
←
(sign_ext(GR[r1]{16:31})
*