MTM1 011100 ..... ..... 00000 00000 001100 @r2
MTM2 011100 ..... ..... 00000 00000 001101 @r2
+MTP0 011100 ..... ..... 00000 00000 001001 @r2
+MTP1 011100 ..... ..... 00000 00000 001010 @r2
+MTP2 011100 ..... ..... 00000 00000 001011 @r2
+
&saa base rt
@saa ...... base:5 rt:5 ................ &saa
SAA 011100 ..... ..... 00000 00000 011000 @saa
TRANS(MTM0, trans_mtm, 0);
TRANS(MTM1, trans_mtm, 1);
TRANS(MTM2, trans_mtm, 2);
+
+static bool trans_mtp(DisasContext *ctx, arg_r2 *a, unsigned int index)
+{
+ /*
+ * Octeon3 two-source MTP forms load lane index from rs and lane index + 3
+ * from rt. Legacy one-source forms encode rt as $zero.
+ */
+ gen_load_gpr(oct_p[index], a->rs);
+ gen_load_gpr(oct_p[index + 3], a->rt);
+
+ /*
+ * Octeon3 clears P1 with a write to P0 so that VMULU sequences remain
+ * backward compatible with Octeon2.
+ */
+ if (index == 0) {
+ tcg_gen_movi_i64(oct_p[1], 0);
+ }
+ return true;
+}
+
+TRANS(MTP0, trans_mtp, 0);
+TRANS(MTP1, trans_mtp, 1);
+TRANS(MTP2, trans_mtp, 2);