On 20/5/26 12:17, Philippe Mathieu-Daudé wrote:
From: James Hilliard <[email protected]>

Add the MTM0, MTM1, and MTM2 forms that load the Octeon3 multiplier
operand pair from rs/rt into MPL[x] and MPL[x+3], then clear the partial
products. For MPL0, also set MPL[1] to zero for backward compatibility
with Octeon2 VMULU.

Legacy single-source encodings have rt encoded as $zero, so the same
translator path also preserves the older Octeon behavior.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: James Hilliard <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
  target/mips/tcg/octeon.decode      |  7 +++++++
  target/mips/tcg/octeon_translate.c | 32 ++++++++++++++++++++++++++++++
  2 files changed, 39 insertions(+)

diff --git a/target/mips/tcg/octeon.decode b/target/mips/tcg/octeon.decode
index 01ed3b50beb..5139543b153 100644
--- a/target/mips/tcg/octeon.decode
+++ b/target/mips/tcg/octeon.decode
@@ -44,6 +44,13 @@ SNE          011100 ..... ..... ..... 00000 101011 @r3
  SEQI         011100 rs:5 rt:5 imm:s10 101110 &cmpi
  SNEI         011100 rs:5 rt:5 imm:s10 101111 &cmpi
+&r2 rs rt
+@r2          ...... rs:5 rt:5 ..... ..... ...... &r2
+
+MTM0         011100 ..... ..... 00000 00000 001000 @r2
+MTM1         011100 ..... ..... 00000 00000 001100 @r2
+MTM2         011100 ..... ..... 00000 00000 001101 @r2

I suppose you don't use a %lane argument (like later patches) due to
the odd encoding.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to