Skip to contentSkip to conversation

target/s390x: Fix CLFIT and CLGIT immediate size

PATCH In review Ilya Leoshkevich 3 participants 3 messages Aug 17, 2022 – Aug 23, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/s390x: Fix CLFIT and CLGIT immediate size

I2 is 16 bits, not 32.

Found by running valgrind's none/tests/s390x/traps.

Fixes 1c2687518235 ("target-s390: Implement COMPARE AND TRAP")
---
 target/s390x/tcg/insn-data.def | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/s390x/tcg/insn-data.def +2 -2
index 5e448bb2c4..6d2cfe5fa2 100644
@@ -290,8 +290,8 @@
     D(0xb961, CLGRT,   RRF_c, GIE, r1_o, r2_o, 0, 0, ct, 0, 1)
     D(0xeb23, CLT,     RSY_b, MIE, r1_32u, m2_32u, 0, 0, ct, 0, 1)
     D(0xeb2b, CLGT,    RSY_b, MIE, r1_o, m2_64, 0, 0, ct, 0, 1)
-    D(0xec73, CLFIT,   RIE_a, GIE, r1_32u, i2_32u, 0, 0, ct, 0, 1)
-    D(0xec71, CLGIT,   RIE_a, GIE, r1_o, i2_32u, 0, 0, ct, 0, 1)
+    D(0xec73, CLFIT,   RIE_a, GIE, r1_32u, i2_16u, 0, 0, ct, 0, 1)
+    D(0xec71, CLGIT,   RIE_a, GIE, r1_o, i2_16u, 0, 0, ct, 0, 1)
 
 /* CONVERT TO DECIMAL */
     C(0x4e00, CVD,     RX_a,  Z,   r1_o, a2, 0, 0, cvd, 0)
Signature · 1 line
2.37.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Ilya Leoshkevich

I2 is 16 bits, not 32.

Found by running valgrind's none/tests/s390x/traps.

Fixes 1c2687518235 ("target-s390: Implement COMPARE AND TRAP")
---
  target/s390x/tcg/insn-data.def | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
target/s390x/tcg/insn-data.def +0 -0
index 5e448bb2c4..6d2cfe5fa2 100644

target/s390x/tcg/insn-data.def line 294

Quoted 7 lines
target/s390x/tcg/insn-data.def +2 -2
@@ -290,8 +290,8 @@
      D(0xb961, CLGRT,   RRF_c, GIE, r1_o, r2_o, 0, 0, ct, 0, 1)
      D(0xeb23, CLT,     RSY_b, MIE, r1_32u, m2_32u, 0, 0, ct, 0, 1)
      D(0xeb2b, CLGT,    RSY_b, MIE, r1_o, m2_64, 0, 0, ct, 0, 1)
-    D(0xec73, CLFIT,   RIE_a, GIE, r1_32u, i2_32u, 0, 0, ct, 0, 1)
-    D(0xec71, CLGIT,   RIE_a, GIE, r1_o, i2_32u, 0, 0, ct, 0, 1)
+    D(0xec73, CLFIT,   RIE_a, GIE, r1_32u, i2_16u, 0, 0, ct, 0, 1)
+    D(0xec71, CLGIT,   RIE_a, GIE, r1_o, i2_16u, 0, 0, ct, 0, 1)

Looks right to me.

I'll queue it to my s390x-next branch (assuming this is not urgent enough for going into 7.1 since it only happend with a testcase)

Reviewed-by on v1 1/1
#2 lore raw
In reply to Ilya Leoshkevich
Quoted 15 lines · Ilya Leoshkevich

I2 is 16 bits, not 32.

Found by running valgrind's none/tests/s390x/traps.

Fixes 1c2687518235 ("target-s390: Implement COMPARE AND TRAP")
---
 target/s390x/tcg/insn-data.def | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/s390x/tcg/insn-data.def +0 -0
index 5e448bb2c4..6d2cfe5fa2 100644

target/s390x/tcg/insn-data.def line 297

Quoted 10 lines
target/s390x/tcg/insn-data.def +2 -2
@@ -290,8 +290,8 @@
     D(0xb961, CLGRT,   RRF_c, GIE, r1_o, r2_o, 0, 0, ct, 0, 1)
     D(0xeb23, CLT,     RSY_b, MIE, r1_32u, m2_32u, 0, 0, ct, 0, 1)
     D(0xeb2b, CLGT,    RSY_b, MIE, r1_o, m2_64, 0, 0, ct, 0, 1)
-    D(0xec73, CLFIT,   RIE_a, GIE, r1_32u, i2_32u, 0, 0, ct, 0, 1)
-    D(0xec71, CLGIT,   RIE_a, GIE, r1_o, i2_32u, 0, 0, ct, 0, 1)
+    D(0xec73, CLFIT,   RIE_a, GIE, r1_32u, i2_16u, 0, 0, ct, 0, 1)
+    D(0xec71, CLGIT,   RIE_a, GIE, r1_o, i2_16u, 0, 0, ct, 0, 1)
 
 /* CONVERT TO DECIMAL */
     C(0x4e00, CVD,     RX_a,  Z,   r1_o, a2, 0, 0, cvd, 0)
Signature · 3 lines
Thanks,

David / dhildenb