mulhd
Multiply High Doubleword
mulhd RT, RA, RB
Multiplies two 64-bit integers and returns the upper 64 bits of the 128-bit result (Signed).
Encoding
Binary Layout
31
0:5
RT
6:10
RA
11:15
RB
16:20
OE
21
73
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 64-bit signed integers (RA and RB) and stores the upper 64 bits of the 128-bit signed result in RT. The overflow flag (OE) is not typically set by this instruction as it returns the mathematically correct upper bits. If Rc=1, CR0 is updated based on the result.
Operation
prod ← (RA) *s (RB); RT ← prod[64:127]; if Rc then CR0 ← (RT < 0, RT > 0, RT = 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.