Commit 13f9680278 for qemu.org
commit 13f9680278e220eeaae43fae7d1d4535b7b15896
Author: Richard Henderson <richard.henderson@linaro.org>
Date: Fri Jul 31 11:56:25 2026 -0700
target/s390x/tcg: Use op_ld for LOAD REVERSED
Use the MemOp parameter to op_ld to directly perform a
little-endian load, rather than a separate byte reverse
after the load.
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260731185628.23161-13-richard.henderson@linaro.org>
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index c79867d409..64711855f3 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -590,9 +590,9 @@
/* LOAD REVERSED */
C(0xb91f, LRVR, RRE, Z, 0, r2_32u, new, r1_32, rev32, 0)
C(0xb90f, LRVGR, RRE, Z, 0, r2_o, r1, 0, rev64, 0)
- C(0xe31f, LRVH, RXY_a, Z, 0, m2_16u, new, r1_16, rev16, 0)
- C(0xe31e, LRV, RXY_a, Z, 0, m2_32u, new, r1_32, rev32, 0)
- C(0xe30f, LRVG, RXY_a, Z, 0, m2_64, r1, 0, rev64, 0)
+ D(0xe31f, LRVH, RXY_a, Z, 0, a2, new, r1_16, ld, 0, MO_LEUW)
+ D(0xe31e, LRV, RXY_a, Z, 0, a2, new, r1_32, ld, 0, MO_LEUL)
+ D(0xe30f, LRVG, RXY_a, Z, 0, a2, r1, 0, ld, 0, MO_LEUQ)
/* LOAD ZERO */
F(0xb374, LZER, RRE, Z, 0, 0, 0, e1, zero, 0, IF_AFP1)
F(0xb375, LZDR, RRE, Z, 0, 0, 0, f1, zero, 0, IF_AFP1)
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 206330000d..1250b2dd7f 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -5762,13 +5762,6 @@ static void in2_m2_16s(DisasContext *s, DisasOps *o)
}
#define SPEC_in2_m2_16s 0
-static void in2_m2_16u(DisasContext *s, DisasOps *o)
-{
- in2_a2(s, o);
- tcg_gen_qemu_ld_i64(o->in2, o->in2, get_mem_index(s), MO_BEUW);
-}
-#define SPEC_in2_m2_16u 0
-
static void in2_m2_32s(DisasContext *s, DisasOps *o)
{
in2_a2(s, o);