On 5/9/26 21:13, James Hilliard wrote:
ZCBT has the same user-mode memory effect as ZCB for QEMU's purposes.

Reuse the ZCB translator so both cache-block-zero forms clear the
containing 128-byte line.

Signed-off-by: James Hilliard <[email protected]>
---
Changes v2 -> v3:
   - Split ZCBT out of the combined Octeon arithmetic and memory
     instruction patch.  (requested by Richard Henderson)
---
  target/mips/tcg/octeon.decode      | 1 +
  target/mips/tcg/octeon_translate.c | 5 +++++
  2 files changed, 6 insertions(+)

diff --git a/target/mips/tcg/octeon.decode b/target/mips/tcg/octeon.decode
index d8a1bfce77..56c54e0973 100644
--- a/target/mips/tcg/octeon.decode
+++ b/target/mips/tcg/octeon.decode
@@ -51,6 +51,7 @@ SAAD         011100 ..... ..... 00000 00000 011001 @saa
&zcb base
  ZCB          011100 base:5 00000 00000 11100 011111 &zcb
+ZCBT         011100 base:5 00000 00000 11101 011111 &zcb
&lx base index rd
  @lx          ...... base:5 index:5 rd:5 ...... ..... &lx
diff --git a/target/mips/tcg/octeon_translate.c 
b/target/mips/tcg/octeon_translate.c
index 794c8f033b..477f681f9e 100644
--- a/target/mips/tcg/octeon_translate.c
+++ b/target/mips/tcg/octeon_translate.c
@@ -203,6 +203,11 @@ static bool trans_ZCB(DisasContext *ctx, arg_zcb *a)
      return true;
  }
+static bool trans_ZCBT(DisasContext *ctx, arg_zcb *a)
+{
+    return trans_ZCB(ctx, a);
+}

In other places I've avoided such thunks for a mere comment in decodetree, like

ZCB   011100 base:5 00000 00000 11101 011111 &zcb  # ZCBT

But as you prefer...
Acked-by: Richard Henderson <[email protected]>


r~

Reply via email to