mulhw
Multiply High Word
mulhw RT, RA, RB
Multiplies two 32-bit integers and returns the upper 32 bits (Signed).
Encoding
Binary Layout
31
0:5
RT
6:10
RA
11:15
RB
16:20
OE
21
75
22:30
Rc
31
Operands
-
RT
Target -
RA
Src A -
RB
Src B
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Multiplies two 32-bit signed integers (RA[32:63] and RB[32:63]) and stores the upper 32 bits of the 64-bit signed result in RT[32:63], with RT[0:31] undefined. If Rc=1, CR0 is updated based on the result. No overflow is recorded.
Operation
prod ← (RA[32:63]) *s (RB[32:63]); RT[32:63] ← prod[32:63]; if Rc then CR0 ← (RT[32:63] < 0, RT[32:63] > 0, RT[32:63] = 0, SO)
Programming Note
When Rc=1 (dot form), CR0 is updated with the signed comparison of the result against zero (LT, GT, EQ) and the current SO bit from XER.