vinserth_p
Vector Insert Halfword from GPR
vinserth vD, RB, UIM
Inserts halfword from GPR into Vector.
Details
Inserts a 16-bit value extracted from GPR RB into the halfword element of vD specified by the 3-bit unsigned immediate index UIM. The halfword from RB[48:63] is placed into the indexed halfword of vD; other halfwords remain unchanged. This instruction is part of VMX and does not update condition flags.
Pseudocode Operation
hword_index ← UIM & 0x7
vD[hword_index * 16 : hword_index * 16 + 15] ← RB[48:63]
Example
vinserth vd, r5, uim
Encoding
Binary Layout
4
0
vD
6
UIM
11
RB
16
845
21
Operands
-
vD
Target -
RB
Source -
UIM
Index