All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping
@ 2026-07-31 18:56 Richard Henderson
  2026-07-31 18:56 ` [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld Richard Henderson
                   ` (14 more replies)
  0 siblings, 15 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Once upon a time we didn't have controllable endianness in our memory ops,
so we were forced to perform the bswap for LOAD/STORE REVERSED manually.
But that hasn't been true for quite some time.  Tidy up all of the simple
loads and stores by stashing the complete MemOp for each instruction.


r~


Richard Henderson (14):
  target/s390x: Convert op_ld8s to op_ld
  target/s390x: Convert op_ld8u to op_ld
  target/s390x: Convert op_ld16s to op_ld
  target/s390x: Convert op_ld16u to op_ld
  target/s390x: Convert op_ld32s to op_ld
  target/s390x: Convert op_ld32u to op_ld
  target/s390x: Convert op_ld64 to op_ld
  target/s390x: Convert op_st8 to op_st
  target/s390x: Convert op_st16 to op_st
  target/s390x: Convert op_st32 to op_st
  target/s390x: Convert op_st64 to op_st
  target/s390x: Use op_ld for LOAD REVERSED
  target/s390x: Use op_st for STORE REVERSED
  target/s390x: Simplify LRVR

 target/s390x/tcg/translate.c     |  89 ++-----------------------
 target/s390x/tcg/insn-data.h.inc | 108 +++++++++++++++----------------
 2 files changed, 59 insertions(+), 138 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:14   ` Philippe Mathieu-Daudé
  2026-08-03 11:39   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 02/14] target/s390x: Convert op_ld8u " Richard Henderson
                   ` (13 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Begin unifying load operations by storing MemOp in insn->data.
Start with op_ld8s.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 4 ++--
 target/s390x/tcg/insn-data.h.inc | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 82165ac1ec..25a7842409 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2749,9 +2749,9 @@ static DisasJumpType op_llgt(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_ld8s(DisasContext *s, DisasOps *o)
+static DisasJumpType op_ld(DisasContext *s, DisasOps *o)
 {
-    tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s), MO_SB);
+    tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s), s->insn->data);
     return DISAS_NEXT;
 }
 
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 0d5392eac5..989e40ce34 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -481,10 +481,10 @@
 /* LOAD BYTE */
     C(0xb926, LBR,     RRE,   EI,  0, r2_8s, 0, r1_32, mov2, 0)
     C(0xb906, LGBR,    RRE,   EI,  0, r2_8s, 0, r1, mov2, 0)
-    C(0xe376, LB,      RXY_a, LD,  0, a2, new, r1_32, ld8s, 0)
-    C(0xe377, LGB,     RXY_a, LD,  0, a2, r1, 0, ld8s, 0)
+    D(0xe376, LB,      RXY_a, LD,  0, a2, new, r1_32, ld, 0, MO_SB)
+    D(0xe377, LGB,     RXY_a, LD,  0, a2, r1, 0, ld, 0, MO_SB)
 /* LOAD BYTE HIGH */
-    C(0xe3c0, LBH,     RXY_a, HW,  0, a2, new, r1_32h, ld8s, 0)
+    D(0xe3c0, LBH,     RXY_a, HW,  0, a2, new, r1_32h, ld, 0, MO_SB)
 /* LOAD COMPLEMENT */
     C(0x1300, LCR,     RR_a,  Z,   0, r2, new, r1_32, neg, neg32)
     C(0xb903, LCGR,    RRE,   Z,   0, r2, r1, 0, neg, neg64)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 02/14] target/s390x: Convert op_ld8u to op_ld
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
  2026-07-31 18:56 ` [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:15   ` Philippe Mathieu-Daudé
  2026-08-03 11:39   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 03/14] target/s390x: Convert op_ld16s " Richard Henderson
                   ` (12 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 6 ------
 target/s390x/tcg/insn-data.h.inc | 6 +++---
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 25a7842409..055e163837 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2755,12 +2755,6 @@ static DisasJumpType op_ld(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_ld8u(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s), MO_UB);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_ld16s(DisasContext *s, DisasOps *o)
 {
     tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s), MO_BESW);
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 989e40ce34..865ef23ebd 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -523,10 +523,10 @@
 /* LOAD LOGICAL CHARACTER */
     C(0xb994, LLCR,    RRE,   EI,  0, r2_8u, 0, r1_32, mov2, 0)
     C(0xb984, LLGCR,   RRE,   EI,  0, r2_8u, 0, r1, mov2, 0)
-    C(0xe394, LLC,     RXY_a, EI,  0, a2, new, r1_32, ld8u, 0)
-    C(0xe390, LLGC,    RXY_a, Z,   0, a2, r1, 0, ld8u, 0)
+    D(0xe394, LLC,     RXY_a, EI,  0, a2, new, r1_32, ld, 0, MO_UB)
+    D(0xe390, LLGC,    RXY_a, Z,   0, a2, r1, 0, ld, 0, MO_UB)
 /* LOAD LOGICAL CHARACTER HIGH */
-    C(0xe3c2, LLCH,    RXY_a, HW,  0, a2, new, r1_32h, ld8u, 0)
+    D(0xe3c2, LLCH,    RXY_a, HW,  0, a2, new, r1_32h, ld, 0, MO_UB)
 /* LOAD LOGICAL HALFWORD */
     C(0xb995, LLHR,    RRE,   EI,  0, r2_16u, 0, r1_32, mov2, 0)
     C(0xb985, LLGHR,   RRE,   EI,  0, r2_16u, 0, r1, mov2, 0)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 03/14] target/s390x: Convert op_ld16s to op_ld
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
  2026-07-31 18:56 ` [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld Richard Henderson
  2026-07-31 18:56 ` [PATCH 02/14] target/s390x: Convert op_ld8u " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:16   ` Philippe Mathieu-Daudé
  2026-08-03 11:40   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 04/14] target/s390x: Convert op_ld16u " Richard Henderson
                   ` (11 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     |  6 ------
 target/s390x/tcg/insn-data.h.inc | 12 ++++++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 055e163837..e0546ba791 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2755,12 +2755,6 @@ static DisasJumpType op_ld(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_ld16s(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s), MO_BESW);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_ld16u(DisasContext *s, DisasOps *o)
 {
     tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s), MO_BEUW);
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 865ef23ebd..ea023fc168 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -498,17 +498,17 @@
 /* LOAD HALFWORD */
     C(0xb927, LHR,     RRE,   EI,  0, r2_16s, 0, r1_32, mov2, 0)
     C(0xb907, LGHR,    RRE,   EI,  0, r2_16s, 0, r1, mov2, 0)
-    C(0x4800, LH,      RX_a,  Z,   0, a2, new, r1_32, ld16s, 0)
-    C(0xe378, LHY,     RXY_a, LD,  0, a2, new, r1_32, ld16s, 0)
-    C(0xe315, LGH,     RXY_a, Z,   0, a2, r1, 0, ld16s, 0)
+    D(0x4800, LH,      RX_a,  Z,   0, a2, new, r1_32, ld, 0, MO_BESW)
+    D(0xe378, LHY,     RXY_a, LD,  0, a2, new, r1_32, ld, 0, MO_BESW)
+    D(0xe315, LGH,     RXY_a, Z,   0, a2, r1, 0, ld, 0, MO_BESW)
 /* LOAD HALFWORD HIGH */
-    C(0xe3c4, LHH,     RXY_a, HW,  0, a2, new, r1_32h, ld16s, 0)
+    D(0xe3c4, LHH,     RXY_a, HW,  0, a2, new, r1_32h, ld, 0, MO_BESW)
 /* LOAD HALFWORD IMMEDIATE */
     C(0xa708, LHI,     RI_a,  Z,   0, i2, 0, r1_32, mov2, 0)
     C(0xa709, LGHI,    RI_a,  Z,   0, i2, 0, r1, mov2, 0)
 /* LOAD HALFWORD RELATIVE LONG */
-    C(0xc405, LHRL,    RIL_b, GIE, 0, ri2, new, r1_32, ld16s, 0)
-    C(0xc404, LGHRL,   RIL_b, GIE, 0, ri2, r1, 0, ld16s, 0)
+    D(0xc405, LHRL,    RIL_b, GIE, 0, ri2, new, r1_32, ld, 0, MO_BESW)
+    D(0xc404, LGHRL,   RIL_b, GIE, 0, ri2, r1, 0, ld, 0, MO_BESW)
 /* LOAD HIGH */
     D(0xe3ca, LFH,     RXY_a, HW,  0, a2, new, r1_32h, ld32u, 0, 0)
 /* LOAG HIGH AND TRAP */
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 04/14] target/s390x: Convert op_ld16u to op_ld
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (2 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 03/14] target/s390x: Convert op_ld16s " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:17   ` Philippe Mathieu-Daudé
  2026-08-03 11:41   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 05/14] target/s390x: Convert op_ld32s " Richard Henderson
                   ` (10 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     |  6 ------
 target/s390x/tcg/insn-data.h.inc | 10 +++++-----
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index e0546ba791..d18450f764 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2755,12 +2755,6 @@ static DisasJumpType op_ld(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_ld16u(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s), MO_BEUW);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_ld32s(DisasContext *s, DisasOps *o)
 {
     tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s),
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index ea023fc168..d6cc157cb2 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -530,13 +530,13 @@
 /* LOAD LOGICAL HALFWORD */
     C(0xb995, LLHR,    RRE,   EI,  0, r2_16u, 0, r1_32, mov2, 0)
     C(0xb985, LLGHR,   RRE,   EI,  0, r2_16u, 0, r1, mov2, 0)
-    C(0xe395, LLH,     RXY_a, EI,  0, a2, new, r1_32, ld16u, 0)
-    C(0xe391, LLGH,    RXY_a, Z,   0, a2, r1, 0, ld16u, 0)
+    D(0xe395, LLH,     RXY_a, EI,  0, a2, new, r1_32, ld, 0, MO_BEUW)
+    D(0xe391, LLGH,    RXY_a, Z,   0, a2, r1, 0, ld, 0, MO_BEUW)
 /* LOAD LOGICAL HALFWORD HIGH */
-    C(0xe3c6, LLHH,    RXY_a, HW,  0, a2, new, r1_32h, ld16u, 0)
+    D(0xe3c6, LLHH,    RXY_a, HW,  0, a2, new, r1_32h, ld, 0, MO_BEUW)
 /* LOAD LOGICAL HALFWORD RELATIVE LONG */
-    C(0xc402, LLHRL,   RIL_b, GIE, 0, ri2, new, r1_32, ld16u, 0)
-    C(0xc406, LLGHRL,  RIL_b, GIE, 0, ri2, r1, 0, ld16u, 0)
+    D(0xc402, LLHRL,   RIL_b, GIE, 0, ri2, new, r1_32, ld, 0, MO_BEUW)
+    D(0xc406, LLGHRL,  RIL_b, GIE, 0, ri2, r1, 0, ld, 0, MO_BEUW)
 /* LOAD LOGICAL IMMEDIATE */
     D(0xc00e, LLIHF,   RIL_a, EI, 0, i2_32u_shl, 0, r1, mov2, 0, 32)
     D(0xc00f, LLILF,   RIL_a, EI, 0, i2_32u_shl, 0, r1, mov2, 0, 0)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 05/14] target/s390x: Convert op_ld32s to op_ld
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (3 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 04/14] target/s390x: Convert op_ld16u " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:17   ` Philippe Mathieu-Daudé
  2026-08-03 11:43   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 06/14] target/s390x: Convert op_ld32u " Richard Henderson
                   ` (9 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Note that op_ld32s already or'd in insn->data, with the only
use being MO_ALIGN.  We now put the entire MemOp in insn->data.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     |  7 -------
 target/s390x/tcg/insn-data.h.inc | 14 +++++++-------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index d18450f764..79e02534cd 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2755,13 +2755,6 @@ static DisasJumpType op_ld(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_ld32s(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s),
-                        MO_BESL | s->insn->data);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_ld32u(DisasContext *s, DisasOps *o)
 {
     tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s),
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index d6cc157cb2..46a4a23d2a 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -418,12 +418,12 @@
 
 /* LOAD */
     C(0x1800, LR,      RR_a,  Z,   0, r2_o, 0, cond_r1r2_32, mov2, 0)
-    D(0x5800, L,       RX_a,  Z,   0, a2, new, r1_32, ld32s, 0, 0)
-    D(0xe358, LY,      RXY_a, LD,  0, a2, new, r1_32, ld32s, 0, 0)
+    D(0x5800, L,       RX_a,  Z,   0, a2, new, r1_32, ld, 0, MO_BESL)
+    D(0xe358, LY,      RXY_a, LD,  0, a2, new, r1_32, ld, 0, MO_BESL)
     C(0xb904, LGR,     RRE,   Z,   0, r2_o, 0, r1, mov2, 0)
     C(0xb914, LGFR,    RRE,   Z,   0, r2_32s, 0, r1, mov2, 0)
     D(0xe304, LG,      RXY_a, Z,   0, a2, r1, 0, ld64, 0, 0)
-    D(0xe314, LGF,     RXY_a, Z,   0, a2, r1, 0, ld32s, 0, 0)
+    D(0xe314, LGF,     RXY_a, Z,   0, a2, r1, 0, ld, 0, MO_BESL)
     F(0x2800, LDR,     RR_a,  Z,   0, f2, 0, f1, mov2, 0, IF_AFP1 | IF_AFP2)
     F(0x6800, LD,      RX_a,  Z,   0, m2_64, 0, f1, mov2, 0, IF_AFP1)
     F(0xed65, LDY,     RXY_a, LD,  0, m2_64, 0, f1, mov2, 0, IF_AFP1)
@@ -434,9 +434,9 @@
 /* LOAD IMMEDIATE */
     C(0xc001, LGFI,    RIL_a, EI,  0, i2, 0, r1, mov2, 0)
 /* LOAD RELATIVE LONG */
-    D(0xc40d, LRL,     RIL_b, GIE, 0, ri2, new, r1_32, ld32s, 0, MO_ALIGN)
+    D(0xc40d, LRL,     RIL_b, GIE, 0, ri2, new, r1_32, ld, 0, MO_BESL | MO_ALIGN)
     D(0xc408, LGRL,    RIL_b, GIE, 0, ri2, r1, 0, ld64, 0, MO_ALIGN)
-    D(0xc40c, LGFRL,   RIL_b, GIE, 0, ri2, r1, 0, ld32s, 0, MO_ALIGN)
+    D(0xc40c, LGFRL,   RIL_b, GIE, 0, ri2, r1, 0, ld, 0, MO_BESL | MO_ALIGN)
 /* LOAD ADDRESS */
     C(0x4100, LA,      RX_a,  Z,   0, a2, 0, r1, mov2, 0)
     C(0xe371, LAY,     RXY_a, LD,  0, a2, 0, r1, mov2, 0)
@@ -464,9 +464,9 @@
     C(0x1200, LTR,     RR_a,  Z,   0, r2_o, 0, cond_r1r2_32, mov2, s32)
     C(0xb902, LTGR,    RRE,   Z,   0, r2_o, 0, r1, mov2, s64)
     C(0xb912, LTGFR,   RRE,   Z,   0, r2_32s, 0, r1, mov2, s64)
-    D(0xe312, LT,      RXY_a, EI,  0, a2, new, r1_32, ld32s, s64, 0)
+    D(0xe312, LT,      RXY_a, EI,  0, a2, new, r1_32, ld, s64, MO_BESL)
     D(0xe302, LTG,     RXY_a, EI,  0, a2, r1, 0, ld64, s64, 0)
-    D(0xe332, LTGF,    RXY_a, GIE, 0, a2, r1, 0, ld32s, s64, 0)
+    D(0xe332, LTGF,    RXY_a, GIE, 0, a2, r1, 0, ld, s64, MO_BESL)
     F(0xb302, LTEBR,   RRE,   Z,   0, e2, 0, cond_e1e2, mov2, f32, IF_BFP)
     F(0xb312, LTDBR,   RRE,   Z,   0, f2, 0, f1, mov2, f64, IF_BFP)
     F(0xb342, LTXBR,   RRE,   Z,   x2h, x2l, 0, x1_P, movx, f128, IF_BFP)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 06/14] target/s390x: Convert op_ld32u to op_ld
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (4 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 05/14] target/s390x: Convert op_ld32s " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:18   ` Philippe Mathieu-Daudé
  2026-08-03 11:44   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 07/14] target/s390x: Convert op_ld64 " Richard Henderson
                   ` (8 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 7 -------
 target/s390x/tcg/insn-data.h.inc | 6 +++---
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 79e02534cd..4f1e8db780 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2755,13 +2755,6 @@ static DisasJumpType op_ld(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_ld32u(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s),
-                        MO_BEUL | s->insn->data);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_ld64(DisasContext *s, DisasOps *o)
 {
     tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s),
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 46a4a23d2a..00c8994345 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -510,16 +510,16 @@
     D(0xc405, LHRL,    RIL_b, GIE, 0, ri2, new, r1_32, ld, 0, MO_BESW)
     D(0xc404, LGHRL,   RIL_b, GIE, 0, ri2, r1, 0, ld, 0, MO_BESW)
 /* LOAD HIGH */
-    D(0xe3ca, LFH,     RXY_a, HW,  0, a2, new, r1_32h, ld32u, 0, 0)
+    D(0xe3ca, LFH,     RXY_a, HW,  0, a2, new, r1_32h, ld, 0, MO_BEUL)
 /* LOAG HIGH AND TRAP */
     C(0xe3c8, LFHAT,   RXY_a, LAT, 0, m2_32u, r1, 0, lfhat, 0)
 /* LOAD LOGICAL */
     C(0xb916, LLGFR,   RRE,   Z,   0, r2_32u, 0, r1, mov2, 0)
-    D(0xe316, LLGF,    RXY_a, Z,   0, a2, r1, 0, ld32u, 0, 0)
+    D(0xe316, LLGF,    RXY_a, Z,   0, a2, r1, 0, ld, 0, MO_BEUL)
 /* LOAD LOGICAL AND TRAP */
     C(0xe39d, LLGFAT,  RXY_a, LAT, 0, a2, r1, 0, llgfat, 0)
 /* LOAD LOGICAL RELATIVE LONG */
-    D(0xc40e, LLGFRL,  RIL_b, GIE, 0, ri2, r1, 0, ld32u, 0, MO_ALIGN)
+    D(0xc40e, LLGFRL,  RIL_b, GIE, 0, ri2, r1, 0, ld, 0, MO_BEUL | MO_ALIGN)
 /* LOAD LOGICAL CHARACTER */
     C(0xb994, LLCR,    RRE,   EI,  0, r2_8u, 0, r1_32, mov2, 0)
     C(0xb984, LLGCR,   RRE,   EI,  0, r2_8u, 0, r1, mov2, 0)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 07/14] target/s390x: Convert op_ld64 to op_ld
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (5 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 06/14] target/s390x: Convert op_ld32u " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:18   ` Philippe Mathieu-Daudé
  2026-08-03 11:45   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 08/14] target/s390x: Convert op_st8 to op_st Richard Henderson
                   ` (7 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 7 -------
 target/s390x/tcg/insn-data.h.inc | 6 +++---
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 4f1e8db780..34ee2d6087 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2755,13 +2755,6 @@ static DisasJumpType op_ld(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_ld64(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_ld_i64(o->out, o->in2, get_mem_index(s),
-                        MO_BEUQ | s->insn->data);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_lat(DisasContext *s, DisasOps *o)
 {
     TCGLabel *lab = gen_new_label();
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 00c8994345..f72607e389 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -422,7 +422,7 @@
     D(0xe358, LY,      RXY_a, LD,  0, a2, new, r1_32, ld, 0, MO_BESL)
     C(0xb904, LGR,     RRE,   Z,   0, r2_o, 0, r1, mov2, 0)
     C(0xb914, LGFR,    RRE,   Z,   0, r2_32s, 0, r1, mov2, 0)
-    D(0xe304, LG,      RXY_a, Z,   0, a2, r1, 0, ld64, 0, 0)
+    D(0xe304, LG,      RXY_a, Z,   0, a2, r1, 0, ld, 0, MO_BEUQ)
     D(0xe314, LGF,     RXY_a, Z,   0, a2, r1, 0, ld, 0, MO_BESL)
     F(0x2800, LDR,     RR_a,  Z,   0, f2, 0, f1, mov2, 0, IF_AFP1 | IF_AFP2)
     F(0x6800, LD,      RX_a,  Z,   0, m2_64, 0, f1, mov2, 0, IF_AFP1)
@@ -435,7 +435,7 @@
     C(0xc001, LGFI,    RIL_a, EI,  0, i2, 0, r1, mov2, 0)
 /* LOAD RELATIVE LONG */
     D(0xc40d, LRL,     RIL_b, GIE, 0, ri2, new, r1_32, ld, 0, MO_BESL | MO_ALIGN)
-    D(0xc408, LGRL,    RIL_b, GIE, 0, ri2, r1, 0, ld64, 0, MO_ALIGN)
+    D(0xc408, LGRL,    RIL_b, GIE, 0, ri2, r1, 0, ld, 0, MO_BEUQ | MO_ALIGN)
     D(0xc40c, LGFRL,   RIL_b, GIE, 0, ri2, r1, 0, ld, 0, MO_BESL | MO_ALIGN)
 /* LOAD ADDRESS */
     C(0x4100, LA,      RX_a,  Z,   0, a2, 0, r1, mov2, 0)
@@ -465,7 +465,7 @@
     C(0xb902, LTGR,    RRE,   Z,   0, r2_o, 0, r1, mov2, s64)
     C(0xb912, LTGFR,   RRE,   Z,   0, r2_32s, 0, r1, mov2, s64)
     D(0xe312, LT,      RXY_a, EI,  0, a2, new, r1_32, ld, s64, MO_BESL)
-    D(0xe302, LTG,     RXY_a, EI,  0, a2, r1, 0, ld64, s64, 0)
+    D(0xe302, LTG,     RXY_a, EI,  0, a2, r1, 0, ld, s64, MO_BEUQ)
     D(0xe332, LTGF,    RXY_a, GIE, 0, a2, r1, 0, ld, s64, MO_BESL)
     F(0xb302, LTEBR,   RRE,   Z,   0, e2, 0, cond_e1e2, mov2, f32, IF_BFP)
     F(0xb312, LTDBR,   RRE,   Z,   0, f2, 0, f1, mov2, f64, IF_BFP)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 08/14] target/s390x: Convert op_st8 to op_st
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (6 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 07/14] target/s390x: Convert op_ld64 " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:18   ` Philippe Mathieu-Daudé
  2026-08-03 11:45   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 09/14] target/s390x: Convert op_st16 " Richard Henderson
                   ` (6 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Begin unifying store operations by storing MemOp in insn->data.
Start with op_st8.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 4 ++--
 target/s390x/tcg/insn-data.h.inc | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 34ee2d6087..feaada544a 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -4342,9 +4342,9 @@ static DisasJumpType op_stfle(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_st8(DisasContext *s, DisasOps *o)
+static DisasJumpType op_st(DisasContext *s, DisasOps *o)
 {
-    tcg_gen_qemu_st_i64(o->in1, o->in2, get_mem_index(s), MO_UB);
+    tcg_gen_qemu_st_i64(o->in1, o->in2, get_mem_index(s), s->insn->data);
     return DISAS_NEXT;
 }
 
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index f72607e389..6fdd730985 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -859,10 +859,10 @@
     D(0xc40f, STRL,    RIL_b, GIE, r1_o, ri2, 0, 0, st32, 0, MO_ALIGN)
     D(0xc40b, STGRL,   RIL_b, GIE, r1_o, ri2, 0, 0, st64, 0, MO_ALIGN)
 /* STORE CHARACTER */
-    C(0x4200, STC,     RX_a,  Z,   r1_o, a2, 0, 0, st8, 0)
-    C(0xe372, STCY,    RXY_a, LD,  r1_o, a2, 0, 0, st8, 0)
+    D(0x4200, STC,     RX_a,  Z,   r1_o, a2, 0, 0, st, 0, MO_UB)
+    D(0xe372, STCY,    RXY_a, LD,  r1_o, a2, 0, 0, st, 0, MO_UB)
 /* STORE CHARACTER HIGH */
-    C(0xe3c3, STCH,    RXY_a, HW,  r1_sr32, a2, 0, 0, st8, 0)
+    D(0xe3c3, STCH,    RXY_a, HW,  r1_sr32, a2, 0, 0, st, 0, MO_UB)
 /* STORE CHARACTERS UNDER MASK */
     D(0xbe00, STCM,    RS_b,  Z,   r1_o, a2, 0, 0, stcm, 0, 0)
     D(0xeb2d, STCMY,   RSY_b, LD,  r1_o, a2, 0, 0, stcm, 0, 0)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 09/14] target/s390x: Convert op_st16 to op_st
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (7 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 08/14] target/s390x: Convert op_st8 to op_st Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:19   ` Philippe Mathieu-Daudé
  2026-08-03 11:46   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 10/14] target/s390x: Convert op_st32 " Richard Henderson
                   ` (5 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 6 ------
 target/s390x/tcg/insn-data.h.inc | 8 ++++----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index feaada544a..8339a7868c 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -4348,12 +4348,6 @@ static DisasJumpType op_st(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_st16(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_st_i64(o->in1, o->in2, get_mem_index(s), MO_BEUW);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_st32(DisasContext *s, DisasOps *o)
 {
     tcg_gen_qemu_st_i64(o->in1, o->in2, get_mem_index(s),
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 6fdd730985..ca495d1dd4 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -868,12 +868,12 @@
     D(0xeb2d, STCMY,   RSY_b, LD,  r1_o, a2, 0, 0, stcm, 0, 0)
     D(0xeb2c, STCMH,   RSY_b, Z,   r1_o, a2, 0, 0, stcm, 0, 32)
 /* STORE HALFWORD */
-    C(0x4000, STH,     RX_a,  Z,   r1_o, a2, 0, 0, st16, 0)
-    C(0xe370, STHY,    RXY_a, LD,  r1_o, a2, 0, 0, st16, 0)
+    D(0x4000, STH,     RX_a,  Z,   r1_o, a2, 0, 0, st, 0, MO_BEUW)
+    D(0xe370, STHY,    RXY_a, LD,  r1_o, a2, 0, 0, st, 0, MO_BEUW)
 /* STORE HALFWORD HIGH */
-    C(0xe3c7, STHH,    RXY_a, HW,  r1_sr32, a2, 0, 0, st16, 0)
+    D(0xe3c7, STHH,    RXY_a, HW,  r1_sr32, a2, 0, 0, st, 0, MO_BEUW)
 /* STORE HALFWORD RELATIVE LONG */
-    C(0xc407, STHRL,   RIL_b, GIE, r1_o, ri2, 0, 0, st16, 0)
+    D(0xc407, STHRL,   RIL_b, GIE, r1_o, ri2, 0, 0, st, 0, MO_BEUW)
 /* STORE HIGH */
     D(0xe3cb, STFH,    RXY_a, HW,  r1_sr32, a2, 0, 0, st32, 0, 0)
 /* STORE ON CONDITION */
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 10/14] target/s390x: Convert op_st32 to op_st
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (8 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 09/14] target/s390x: Convert op_st16 " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:19   ` Philippe Mathieu-Daudé
  2026-08-03 11:47   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 11/14] target/s390x: Convert op_st64 " Richard Henderson
                   ` (4 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Note that op_st32 already or'd in insn->data, with the only use
being MO_ALIGN.  We now put the entire MemOp in insn->data.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     |  7 -------
 target/s390x/tcg/insn-data.h.inc | 12 ++++++------
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 8339a7868c..5cfa4d7d1a 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -4348,13 +4348,6 @@ static DisasJumpType op_st(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_st32(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_st_i64(o->in1, o->in2, get_mem_index(s),
-                        MO_BEUL | s->insn->data);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_st64(DisasContext *s, DisasOps *o)
 {
     tcg_gen_qemu_st_i64(o->in1, o->in2, get_mem_index(s),
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index ca495d1dd4..54234ffb57 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -848,15 +848,15 @@
     F(0xed15, SQDB,    RXE,   Z,   0, m2_64, new, f1, sqdb, 0, IF_BFP)
 
 /* STORE */
-    D(0x5000, ST,      RX_a,  Z,   r1_o, a2, 0, 0, st32, 0, 0)
-    D(0xe350, STY,     RXY_a, LD,  r1_o, a2, 0, 0, st32, 0, 0)
+    D(0x5000, ST,      RX_a,  Z,   r1_o, a2, 0, 0, st, 0, MO_BEUL)
+    D(0xe350, STY,     RXY_a, LD,  r1_o, a2, 0, 0, st, 0, MO_BEUL)
     D(0xe324, STG,     RXY_a, Z,   r1_o, a2, 0, 0, st64, 0, 0)
     E(0x6000, STD,     RX_a,  Z,   f1, a2, 0, 0, st64, 0, 0, IF_AFP1)
     E(0xed67, STDY,    RXY_a, LD,  f1, a2, 0, 0, st64, 0, 0, IF_AFP1)
-    E(0x7000, STE,     RX_a,  Z,   e1, a2, 0, 0, st32, 0, 0, IF_AFP1)
-    E(0xed66, STEY,    RXY_a, LD,  e1, a2, 0, 0, st32, 0, 0, IF_AFP1)
+    E(0x7000, STE,     RX_a,  Z,   e1, a2, 0, 0, st, 0, MO_BEUL, IF_AFP1)
+    E(0xed66, STEY,    RXY_a, LD,  e1, a2, 0, 0, st, 0, MO_BEUL, IF_AFP1)
 /* STORE RELATIVE LONG */
-    D(0xc40f, STRL,    RIL_b, GIE, r1_o, ri2, 0, 0, st32, 0, MO_ALIGN)
+    D(0xc40f, STRL,    RIL_b, GIE, r1_o, ri2, 0, 0, st, 0, MO_BEUL | MO_ALIGN)
     D(0xc40b, STGRL,   RIL_b, GIE, r1_o, ri2, 0, 0, st64, 0, MO_ALIGN)
 /* STORE CHARACTER */
     D(0x4200, STC,     RX_a,  Z,   r1_o, a2, 0, 0, st, 0, MO_UB)
@@ -875,7 +875,7 @@
 /* STORE HALFWORD RELATIVE LONG */
     D(0xc407, STHRL,   RIL_b, GIE, r1_o, ri2, 0, 0, st, 0, MO_BEUW)
 /* STORE HIGH */
-    D(0xe3cb, STFH,    RXY_a, HW,  r1_sr32, a2, 0, 0, st32, 0, 0)
+    D(0xe3cb, STFH,    RXY_a, HW,  r1_sr32, a2, 0, 0, st, 0, MO_BEUL)
 /* STORE ON CONDITION */
     D(0xebf3, STOC,    RSY_b, LOC, 0, 0, 0, 0, soc, 0, 0)
     D(0xebe3, STOCG,   RSY_b, LOC, 0, 0, 0, 0, soc, 0, 1)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 11/14] target/s390x: Convert op_st64 to op_st
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (9 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 10/14] target/s390x: Convert op_st32 " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:20   ` Philippe Mathieu-Daudé
  2026-08-03 11:48   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 12/14] target/s390x: Use op_ld for LOAD REVERSED Richard Henderson
                   ` (3 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 7 -------
 target/s390x/tcg/insn-data.h.inc | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 5cfa4d7d1a..61793a9e80 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -4348,13 +4348,6 @@ static DisasJumpType op_st(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_st64(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_qemu_st_i64(o->in1, o->in2, get_mem_index(s),
-                        MO_BEUQ | s->insn->data);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_stam(DisasContext *s, DisasOps *o)
 {
     TCGv_i32 r1 = tcg_constant_i32(get_field(s, r1));
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 54234ffb57..3611da1ef3 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -850,14 +850,14 @@
 /* STORE */
     D(0x5000, ST,      RX_a,  Z,   r1_o, a2, 0, 0, st, 0, MO_BEUL)
     D(0xe350, STY,     RXY_a, LD,  r1_o, a2, 0, 0, st, 0, MO_BEUL)
-    D(0xe324, STG,     RXY_a, Z,   r1_o, a2, 0, 0, st64, 0, 0)
-    E(0x6000, STD,     RX_a,  Z,   f1, a2, 0, 0, st64, 0, 0, IF_AFP1)
-    E(0xed67, STDY,    RXY_a, LD,  f1, a2, 0, 0, st64, 0, 0, IF_AFP1)
+    D(0xe324, STG,     RXY_a, Z,   r1_o, a2, 0, 0, st, 0, MO_BEUQ)
+    E(0x6000, STD,     RX_a,  Z,   f1, a2, 0, 0, st, 0, MO_BEUQ, IF_AFP1)
+    E(0xed67, STDY,    RXY_a, LD,  f1, a2, 0, 0, st, 0, MO_BEUQ, IF_AFP1)
     E(0x7000, STE,     RX_a,  Z,   e1, a2, 0, 0, st, 0, MO_BEUL, IF_AFP1)
     E(0xed66, STEY,    RXY_a, LD,  e1, a2, 0, 0, st, 0, MO_BEUL, IF_AFP1)
 /* STORE RELATIVE LONG */
     D(0xc40f, STRL,    RIL_b, GIE, r1_o, ri2, 0, 0, st, 0, MO_BEUL | MO_ALIGN)
-    D(0xc40b, STGRL,   RIL_b, GIE, r1_o, ri2, 0, 0, st64, 0, MO_ALIGN)
+    D(0xc40b, STGRL,   RIL_b, GIE, r1_o, ri2, 0, 0, st, 0, MO_BEUQ | MO_ALIGN)
 /* STORE CHARACTER */
     D(0x4200, STC,     RX_a,  Z,   r1_o, a2, 0, 0, st, 0, MO_UB)
     D(0xe372, STCY,    RXY_a, LD,  r1_o, a2, 0, 0, st, 0, MO_UB)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 12/14] target/s390x: Use op_ld for LOAD REVERSED
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (10 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 11/14] target/s390x: Convert op_st64 " Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:22   ` Philippe Mathieu-Daudé
  2026-08-03 12:15   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 13/14] target/s390x: Use op_st for STORE REVERSED Richard Henderson
                   ` (2 subsequent siblings)
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Use the MemOp parameter to op_ld to directly perform a
little-endian load, rather than a separate byte reverse
after the load.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 7 -------
 target/s390x/tcg/insn-data.h.inc | 6 +++---
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 61793a9e80..7c1961567d 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -5760,13 +5760,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);
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 3611da1ef3..691f8222ab 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)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 13/14] target/s390x: Use op_st for STORE REVERSED
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (11 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 12/14] target/s390x: Use op_ld for LOAD REVERSED Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 14:21   ` Philippe Mathieu-Daudé
  2026-08-03 12:15   ` Ilya Leoshkevich
  2026-07-31 18:56 ` [PATCH 14/14] target/s390x: Simplify LRVR Richard Henderson
  2026-08-03 12:38 ` [PATCH v2] tests/tcg/s390x: Test LOAD and STORE REVERSED Ilya Leoshkevich
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

Use the MemOp parameter to op_st to directly perform a
little-endian store, rather than a separate byte reverse
before the store.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 13 -------------
 target/s390x/tcg/insn-data.h.inc |  6 +++---
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 7c1961567d..09c5541615 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -3713,12 +3713,6 @@ static DisasJumpType op_rosbg(DisasContext *s, DisasOps *o)
     return DISAS_NEXT;
 }
 
-static DisasJumpType op_rev16(DisasContext *s, DisasOps *o)
-{
-    tcg_gen_bswap16_i64(o->out, o->in2, TCG_BSWAP_IZ | TCG_BSWAP_OZ);
-    return DISAS_NEXT;
-}
-
 static DisasJumpType op_rev32(DisasContext *s, DisasOps *o)
 {
     tcg_gen_bswap32_i64(o->out, o->in2, TCG_BSWAP_IZ | TCG_BSWAP_OZ);
@@ -5543,13 +5537,6 @@ static void in2_r1_o(DisasContext *s, DisasOps *o)
 }
 #define SPEC_in2_r1_o 0
 
-static void in2_r1_16u(DisasContext *s, DisasOps *o)
-{
-    o->in2 = tcg_temp_new_i64();
-    tcg_gen_ext16u_i64(o->in2, regs[get_field(s, r1)]);
-}
-#define SPEC_in2_r1_16u 0
-
 static void in2_r1_32u(DisasContext *s, DisasOps *o)
 {
     o->in2 = tcg_temp_new_i64();
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 691f8222ab..774a3cec36 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -882,9 +882,9 @@
 /* STORE HIGH ON CONDITION */
     D(0xebe1, STOCFH,  RSY_b, LOC2, 0, 0, 0, 0, soc, 0, 2)
 /* STORE REVERSED */
-    C(0xe33f, STRVH,   RXY_a, Z,   la2, r1_16u, new, m1_16, rev16, 0)
-    C(0xe33e, STRV,    RXY_a, Z,   la2, r1_32u, new, m1_32, rev32, 0)
-    C(0xe32f, STRVG,   RXY_a, Z,   la2, r1_o, new, m1_64, rev64, 0)
+    D(0xe33f, STRVH,   RXY_a, Z,   r1_o, a2, 0, 0, st, 0, MO_LEUW)
+    D(0xe33e, STRV,    RXY_a, Z,   r1_o, a2, 0, 0, st, 0, MO_LEUL)
+    D(0xe32f, STRVG,   RXY_a, Z,   r1_o, a2, 0, 0, st, 0, MO_LEUQ)
 
 /* STORE CLOCK */
     F(0xb205, STCK,    S,     Z,   la2, 0, new, m1_64, stck, 0, IF_IO)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 14/14] target/s390x: Simplify LRVR
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (12 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 13/14] target/s390x: Use op_st for STORE REVERSED Richard Henderson
@ 2026-07-31 18:56 ` Richard Henderson
  2026-08-02 17:24   ` Philippe Mathieu-Daudé
  2026-08-03 12:17   ` Ilya Leoshkevich
  2026-08-03 12:38 ` [PATCH v2] tests/tcg/s390x: Test LOAD and STORE REVERSED Ilya Leoshkevich
  14 siblings, 2 replies; 45+ messages in thread
From: Richard Henderson @ 2026-07-31 18:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-s390x, philmd

If we drop TCG_BSWAP_IZ, we don't need to zero-extend r1 on input.
Since the output gets passed to deposit in wout_r1_32, the high
bits of the bswap output need not have any specific value, so we
can drop TCG_BSWAP_OZ.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/translate.c     | 2 +-
 target/s390x/tcg/insn-data.h.inc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 09c5541615..07ec01232d 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -3715,7 +3715,7 @@ static DisasJumpType op_rosbg(DisasContext *s, DisasOps *o)
 
 static DisasJumpType op_rev32(DisasContext *s, DisasOps *o)
 {
-    tcg_gen_bswap32_i64(o->out, o->in2, TCG_BSWAP_IZ | TCG_BSWAP_OZ);
+    tcg_gen_bswap32_i64(o->out, o->in2, 0);
     return DISAS_NEXT;
 }
 
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index 774a3cec36..0dbd433ce5 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -588,7 +588,7 @@
     F(0xb340, LPXBR,   RRE,   Z,   x2h, x2l, new_P, x1_P, absf128, f128, IF_BFP)
     F(0xb370, LPDFR,   RRE,   FPSSH, 0, f2, new, f1, absf64, 0, IF_AFP1 | IF_AFP2)
 /* LOAD REVERSED */
-    C(0xb91f, LRVR,    RRE,   Z,   0, r2_32u, new, r1_32, rev32, 0)
+    C(0xb91f, LRVR,    RRE,   Z,   0, r2_o, new, r1_32, rev32, 0)
     C(0xb90f, LRVGR,   RRE,   Z,   0, r2_o, 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)
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld
  2026-07-31 18:56 ` [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld Richard Henderson
@ 2026-08-02 14:14   ` Philippe Mathieu-Daudé
  2026-08-03 11:39   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:14 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Begin unifying load operations by storing MemOp in insn->data.
> Start with op_ld8s.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 4 ++--
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 02/14] target/s390x: Convert op_ld8u to op_ld
  2026-07-31 18:56 ` [PATCH 02/14] target/s390x: Convert op_ld8u " Richard Henderson
@ 2026-08-02 14:15   ` Philippe Mathieu-Daudé
  2026-08-03 11:39   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:15 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 6 ------
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 3 insertions(+), 9 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 03/14] target/s390x: Convert op_ld16s to op_ld
  2026-07-31 18:56 ` [PATCH 03/14] target/s390x: Convert op_ld16s " Richard Henderson
@ 2026-08-02 14:16   ` Philippe Mathieu-Daudé
  2026-08-03 11:40   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:16 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     |  6 ------
>   target/s390x/tcg/insn-data.h.inc | 12 ++++++------
>   2 files changed, 6 insertions(+), 12 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 04/14] target/s390x: Convert op_ld16u to op_ld
  2026-07-31 18:56 ` [PATCH 04/14] target/s390x: Convert op_ld16u " Richard Henderson
@ 2026-08-02 14:17   ` Philippe Mathieu-Daudé
  2026-08-03 11:41   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:17 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     |  6 ------
>   target/s390x/tcg/insn-data.h.inc | 10 +++++-----
>   2 files changed, 5 insertions(+), 11 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 05/14] target/s390x: Convert op_ld32s to op_ld
  2026-07-31 18:56 ` [PATCH 05/14] target/s390x: Convert op_ld32s " Richard Henderson
@ 2026-08-02 14:17   ` Philippe Mathieu-Daudé
  2026-08-03 11:43   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:17 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Note that op_ld32s already or'd in insn->data, with the only
> use being MO_ALIGN.  We now put the entire MemOp in insn->data.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     |  7 -------
>   target/s390x/tcg/insn-data.h.inc | 14 +++++++-------
>   2 files changed, 7 insertions(+), 14 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 06/14] target/s390x: Convert op_ld32u to op_ld
  2026-07-31 18:56 ` [PATCH 06/14] target/s390x: Convert op_ld32u " Richard Henderson
@ 2026-08-02 14:18   ` Philippe Mathieu-Daudé
  2026-08-03 11:44   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:18 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 7 -------
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 3 insertions(+), 10 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 07/14] target/s390x: Convert op_ld64 to op_ld
  2026-07-31 18:56 ` [PATCH 07/14] target/s390x: Convert op_ld64 " Richard Henderson
@ 2026-08-02 14:18   ` Philippe Mathieu-Daudé
  2026-08-03 11:45   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:18 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 7 -------
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 3 insertions(+), 10 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 08/14] target/s390x: Convert op_st8 to op_st
  2026-07-31 18:56 ` [PATCH 08/14] target/s390x: Convert op_st8 to op_st Richard Henderson
@ 2026-08-02 14:18   ` Philippe Mathieu-Daudé
  2026-08-03 11:45   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:18 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Begin unifying store operations by storing MemOp in insn->data.
> Start with op_st8.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 4 ++--
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 09/14] target/s390x: Convert op_st16 to op_st
  2026-07-31 18:56 ` [PATCH 09/14] target/s390x: Convert op_st16 " Richard Henderson
@ 2026-08-02 14:19   ` Philippe Mathieu-Daudé
  2026-08-03 11:46   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:19 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 6 ------
>   target/s390x/tcg/insn-data.h.inc | 8 ++++----
>   2 files changed, 4 insertions(+), 10 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 10/14] target/s390x: Convert op_st32 to op_st
  2026-07-31 18:56 ` [PATCH 10/14] target/s390x: Convert op_st32 " Richard Henderson
@ 2026-08-02 14:19   ` Philippe Mathieu-Daudé
  2026-08-03 11:47   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:19 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Note that op_st32 already or'd in insn->data, with the only use
> being MO_ALIGN.  We now put the entire MemOp in insn->data.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     |  7 -------
>   target/s390x/tcg/insn-data.h.inc | 12 ++++++------
>   2 files changed, 6 insertions(+), 13 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 11/14] target/s390x: Convert op_st64 to op_st
  2026-07-31 18:56 ` [PATCH 11/14] target/s390x: Convert op_st64 " Richard Henderson
@ 2026-08-02 14:20   ` Philippe Mathieu-Daudé
  2026-08-03 11:48   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:20 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 7 -------
>   target/s390x/tcg/insn-data.h.inc | 8 ++++----
>   2 files changed, 4 insertions(+), 11 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 13/14] target/s390x: Use op_st for STORE REVERSED
  2026-07-31 18:56 ` [PATCH 13/14] target/s390x: Use op_st for STORE REVERSED Richard Henderson
@ 2026-08-02 14:21   ` Philippe Mathieu-Daudé
  2026-08-03 12:15   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:21 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Use the MemOp parameter to op_st to directly perform a
> little-endian store, rather than a separate byte reverse
> before the store.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 13 -------------
>   target/s390x/tcg/insn-data.h.inc |  6 +++---
>   2 files changed, 3 insertions(+), 16 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 12/14] target/s390x: Use op_ld for LOAD REVERSED
  2026-07-31 18:56 ` [PATCH 12/14] target/s390x: Use op_ld for LOAD REVERSED Richard Henderson
@ 2026-08-02 14:22   ` Philippe Mathieu-Daudé
  2026-08-03 12:15   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 14:22 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> Use the MemOp parameter to op_ld to directly perform a
> little-endian load, rather than a separate byte reverse
> after the load.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 7 -------
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 3 insertions(+), 10 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 14/14] target/s390x: Simplify LRVR
  2026-07-31 18:56 ` [PATCH 14/14] target/s390x: Simplify LRVR Richard Henderson
@ 2026-08-02 17:24   ` Philippe Mathieu-Daudé
  2026-08-03 12:17   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-02 17:24 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x

On 31/7/26 20:56, Richard Henderson wrote:
> If we drop TCG_BSWAP_IZ, we don't need to zero-extend r1 on input.
> Since the output gets passed to deposit in wout_r1_32, the high
> bits of the bswap output need not have any specific value, so we
> can drop TCG_BSWAP_OZ.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 2 +-
>   target/s390x/tcg/insn-data.h.inc | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld
  2026-07-31 18:56 ` [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld Richard Henderson
  2026-08-02 14:14   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:39   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:39 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Begin unifying load operations by storing MemOp in insn->data.
> Start with op_ld8s.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 4 ++--
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>



^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 02/14] target/s390x: Convert op_ld8u to op_ld
  2026-07-31 18:56 ` [PATCH 02/14] target/s390x: Convert op_ld8u " Richard Henderson
  2026-08-02 14:15   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:39   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:39 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 6 ------
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 3 insertions(+), 9 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>



^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 03/14] target/s390x: Convert op_ld16s to op_ld
  2026-07-31 18:56 ` [PATCH 03/14] target/s390x: Convert op_ld16s " Richard Henderson
  2026-08-02 14:16   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:40   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:40 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     |  6 ------
>   target/s390x/tcg/insn-data.h.inc | 12 ++++++------
>   2 files changed, 6 insertions(+), 12 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>




^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 04/14] target/s390x: Convert op_ld16u to op_ld
  2026-07-31 18:56 ` [PATCH 04/14] target/s390x: Convert op_ld16u " Richard Henderson
  2026-08-02 14:17   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:41   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:41 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     |  6 ------
>   target/s390x/tcg/insn-data.h.inc | 10 +++++-----
>   2 files changed, 5 insertions(+), 11 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>




^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 05/14] target/s390x: Convert op_ld32s to op_ld
  2026-07-31 18:56 ` [PATCH 05/14] target/s390x: Convert op_ld32s " Richard Henderson
  2026-08-02 14:17   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:43   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:43 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Note that op_ld32s already or'd in insn->data, with the only
> use being MO_ALIGN.  We now put the entire MemOp in insn->data.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     |  7 -------
>   target/s390x/tcg/insn-data.h.inc | 14 +++++++-------
>   2 files changed, 7 insertions(+), 14 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>



^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 06/14] target/s390x: Convert op_ld32u to op_ld
  2026-07-31 18:56 ` [PATCH 06/14] target/s390x: Convert op_ld32u " Richard Henderson
  2026-08-02 14:18   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:44   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:44 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 7 -------
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 3 insertions(+), 10 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 07/14] target/s390x: Convert op_ld64 to op_ld
  2026-07-31 18:56 ` [PATCH 07/14] target/s390x: Convert op_ld64 " Richard Henderson
  2026-08-02 14:18   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:45   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:45 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 7 -------
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 3 insertions(+), 10 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>




^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 08/14] target/s390x: Convert op_st8 to op_st
  2026-07-31 18:56 ` [PATCH 08/14] target/s390x: Convert op_st8 to op_st Richard Henderson
  2026-08-02 14:18   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:45   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:45 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Begin unifying store operations by storing MemOp in insn->data.
> Start with op_st8.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 4 ++--
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 09/14] target/s390x: Convert op_st16 to op_st
  2026-07-31 18:56 ` [PATCH 09/14] target/s390x: Convert op_st16 " Richard Henderson
  2026-08-02 14:19   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:46   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:46 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 6 ------
>   target/s390x/tcg/insn-data.h.inc | 8 ++++----
>   2 files changed, 4 insertions(+), 10 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 10/14] target/s390x: Convert op_st32 to op_st
  2026-07-31 18:56 ` [PATCH 10/14] target/s390x: Convert op_st32 " Richard Henderson
  2026-08-02 14:19   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:47   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:47 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Note that op_st32 already or'd in insn->data, with the only use
> being MO_ALIGN.  We now put the entire MemOp in insn->data.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     |  7 -------
>   target/s390x/tcg/insn-data.h.inc | 12 ++++++------
>   2 files changed, 6 insertions(+), 13 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>




^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 11/14] target/s390x: Convert op_st64 to op_st
  2026-07-31 18:56 ` [PATCH 11/14] target/s390x: Convert op_st64 " Richard Henderson
  2026-08-02 14:20   ` Philippe Mathieu-Daudé
@ 2026-08-03 11:48   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 11:48 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 7 -------
>   target/s390x/tcg/insn-data.h.inc | 8 ++++----
>   2 files changed, 4 insertions(+), 11 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>




^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 12/14] target/s390x: Use op_ld for LOAD REVERSED
  2026-07-31 18:56 ` [PATCH 12/14] target/s390x: Use op_ld for LOAD REVERSED Richard Henderson
  2026-08-02 14:22   ` Philippe Mathieu-Daudé
@ 2026-08-03 12:15   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 12:15 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Use the MemOp parameter to op_ld to directly perform a
> little-endian load, rather than a separate byte reverse
> after the load.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 7 -------
>   target/s390x/tcg/insn-data.h.inc | 6 +++---
>   2 files changed, 3 insertions(+), 10 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>




^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 13/14] target/s390x: Use op_st for STORE REVERSED
  2026-07-31 18:56 ` [PATCH 13/14] target/s390x: Use op_st for STORE REVERSED Richard Henderson
  2026-08-02 14:21   ` Philippe Mathieu-Daudé
@ 2026-08-03 12:15   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 12:15 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> Use the MemOp parameter to op_st to directly perform a
> little-endian store, rather than a separate byte reverse
> before the store.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 13 -------------
>   target/s390x/tcg/insn-data.h.inc |  6 +++---
>   2 files changed, 3 insertions(+), 16 deletions(-)
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>



^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 14/14] target/s390x: Simplify LRVR
  2026-07-31 18:56 ` [PATCH 14/14] target/s390x: Simplify LRVR Richard Henderson
  2026-08-02 17:24   ` Philippe Mathieu-Daudé
@ 2026-08-03 12:17   ` Ilya Leoshkevich
  1 sibling, 0 replies; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 12:17 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-s390x, philmd



On 7/31/26 20:56, Richard Henderson wrote:
> If we drop TCG_BSWAP_IZ, we don't need to zero-extend r1 on input.
> Since the output gets passed to deposit in wout_r1_32, the high
> bits of the bswap output need not have any specific value, so we
> can drop TCG_BSWAP_OZ.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/translate.c     | 2 +-
>   target/s390x/tcg/insn-data.h.inc | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>




^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH v2] tests/tcg/s390x: Test LOAD and STORE REVERSED
  2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
                   ` (13 preceding siblings ...)
  2026-07-31 18:56 ` [PATCH 14/14] target/s390x: Simplify LRVR Richard Henderson
@ 2026-08-03 12:38 ` Ilya Leoshkevich
  2026-08-06 17:42   ` Richard Henderson
  14 siblings, 1 reply; 45+ messages in thread
From: Ilya Leoshkevich @ 2026-08-03 12:38 UTC (permalink / raw)
  To: richard.henderson, qemu-devel; +Cc: qemu-s390x, philmd, Ilya Leoshkevich

Add a small test to prevent regressions.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---

v1 -> v2: CC: qemu-devel@nongnu.org.
          Check that upper bytes are not modified.

 tests/tcg/s390x/Makefile.target       |  1 +
 tests/tcg/s390x/load-store-reversed.c | 46 +++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 tests/tcg/s390x/load-store-reversed.c

diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
index 0ca030ded01..fe1fba3de2f 100644
--- a/tests/tcg/s390x/Makefile.target
+++ b/tests/tcg/s390x/Makefile.target
@@ -50,6 +50,7 @@ TESTS+=cvb
 TESTS+=ts
 TESTS+=ex-smc
 TESTS+=divide-to-integer
+TESTS+=load-store-reversed
 
 cdsg: CFLAGS+=-pthread
 cdsg: LDFLAGS+=-pthread
diff --git a/tests/tcg/s390x/load-store-reversed.c b/tests/tcg/s390x/load-store-reversed.c
new file mode 100644
index 00000000000..bcc6b98dd3b
--- /dev/null
+++ b/tests/tcg/s390x/load-store-reversed.c
@@ -0,0 +1,46 @@
+/*
+ * Test the LOAD REVERSED and STORE REVERSED instructions.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#include <assert.h>
+#include <stdlib.h>
+
+int main(void)
+{
+    long i = 0x123456789abcdefULL, o;
+
+    o = i;
+    asm("lrvr %0,%1" : "+r" (o) : "r" (i));
+    assert(o == 0x1234567efcdab89ULL);
+
+    o = i;
+    asm("lrvgr %0,%1" : "+r" (o) : "r" (i));
+    assert(o == 0xefcdab8967452301ULL);
+
+    o = i;
+    asm("lrvh %0,%1" : "=r" (o) : "T" (i));
+    assert(o == 0x123456789ab2301ULL);
+
+    o = i;
+    asm("lrv %0,%1" : "=r" (o) : "T" (i));
+    assert(o == 0x123456767452301ULL);
+
+    o = i;
+    asm("lrvg %0,%1" : "=r" (o) : "T" (i));
+    assert(o == 0xefcdab8967452301ULL);
+
+    o = i;
+    asm("strvh %1,%0" : "=T" (o) : "r" (i));
+    assert(o == 0xefcd456789abcdefULL);
+
+    o = i;
+    asm("strv %1,%0" : "=T" (o) : "r" (i));
+    assert(o == 0xefcdab8989abcdefULL);
+
+    o = i;
+    asm("strvg %1,%0" : "=T" (o) : "r" (i));
+    assert(o == 0xefcdab8967452301ULL);
+
+    return EXIT_SUCCESS;
+}
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [PATCH v2] tests/tcg/s390x: Test LOAD and STORE REVERSED
  2026-08-03 12:38 ` [PATCH v2] tests/tcg/s390x: Test LOAD and STORE REVERSED Ilya Leoshkevich
@ 2026-08-06 17:42   ` Richard Henderson
  0 siblings, 0 replies; 45+ messages in thread
From: Richard Henderson @ 2026-08-06 17:42 UTC (permalink / raw)
  To: Ilya Leoshkevich, qemu-devel; +Cc: qemu-s390x, philmd

On 8/3/26 05:38, Ilya Leoshkevich wrote:
> Add a small test to prevent regressions.
> 
> Signed-off-by: Ilya Leoshkevich<iii@linux.ibm.com>
> ---
> 
> v1 -> v2: CC:qemu-devel@nongnu.org.
>            Check that upper bytes are not modified.
> 
>   tests/tcg/s390x/Makefile.target       |  1 +
>   tests/tcg/s390x/load-store-reversed.c | 46 +++++++++++++++++++++++++++
>   2 files changed, 47 insertions(+)
>   create mode 100644 tests/tcg/s390x/load-store-reversed.c

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2026-08-06 17:43 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 18:56 [PATCH 00/14] target/s390x: Clean up mem ops and byte swapping Richard Henderson
2026-07-31 18:56 ` [PATCH 01/14] target/s390x: Convert op_ld8s to op_ld Richard Henderson
2026-08-02 14:14   ` Philippe Mathieu-Daudé
2026-08-03 11:39   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 02/14] target/s390x: Convert op_ld8u " Richard Henderson
2026-08-02 14:15   ` Philippe Mathieu-Daudé
2026-08-03 11:39   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 03/14] target/s390x: Convert op_ld16s " Richard Henderson
2026-08-02 14:16   ` Philippe Mathieu-Daudé
2026-08-03 11:40   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 04/14] target/s390x: Convert op_ld16u " Richard Henderson
2026-08-02 14:17   ` Philippe Mathieu-Daudé
2026-08-03 11:41   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 05/14] target/s390x: Convert op_ld32s " Richard Henderson
2026-08-02 14:17   ` Philippe Mathieu-Daudé
2026-08-03 11:43   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 06/14] target/s390x: Convert op_ld32u " Richard Henderson
2026-08-02 14:18   ` Philippe Mathieu-Daudé
2026-08-03 11:44   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 07/14] target/s390x: Convert op_ld64 " Richard Henderson
2026-08-02 14:18   ` Philippe Mathieu-Daudé
2026-08-03 11:45   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 08/14] target/s390x: Convert op_st8 to op_st Richard Henderson
2026-08-02 14:18   ` Philippe Mathieu-Daudé
2026-08-03 11:45   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 09/14] target/s390x: Convert op_st16 " Richard Henderson
2026-08-02 14:19   ` Philippe Mathieu-Daudé
2026-08-03 11:46   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 10/14] target/s390x: Convert op_st32 " Richard Henderson
2026-08-02 14:19   ` Philippe Mathieu-Daudé
2026-08-03 11:47   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 11/14] target/s390x: Convert op_st64 " Richard Henderson
2026-08-02 14:20   ` Philippe Mathieu-Daudé
2026-08-03 11:48   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 12/14] target/s390x: Use op_ld for LOAD REVERSED Richard Henderson
2026-08-02 14:22   ` Philippe Mathieu-Daudé
2026-08-03 12:15   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 13/14] target/s390x: Use op_st for STORE REVERSED Richard Henderson
2026-08-02 14:21   ` Philippe Mathieu-Daudé
2026-08-03 12:15   ` Ilya Leoshkevich
2026-07-31 18:56 ` [PATCH 14/14] target/s390x: Simplify LRVR Richard Henderson
2026-08-02 17:24   ` Philippe Mathieu-Daudé
2026-08-03 12:17   ` Ilya Leoshkevich
2026-08-03 12:38 ` [PATCH v2] tests/tcg/s390x: Test LOAD and STORE REVERSED Ilya Leoshkevich
2026-08-06 17:42   ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.