qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/s390x: Fix CLFIT and CLGIT immediate size
@ 2022-08-17 16:15 Ilya Leoshkevich
  2022-08-22 13:09 ` Thomas Huth
  2022-08-23 12:53 ` David Hildenbrand
  0 siblings, 2 replies; 3+ messages in thread
From: Ilya Leoshkevich @ 2022-08-17 16:15 UTC (permalink / raw)
  To: Richard Henderson, David Hildenbrand, Cornelia Huck, Thomas Huth
  Cc: qemu-s390x, qemu-devel, 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")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 target/s390x/tcg/insn-data.def | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/s390x/tcg/insn-data.def b/target/s390x/tcg/insn-data.def
index 5e448bb2c4..6d2cfe5fa2 100644
--- a/target/s390x/tcg/insn-data.def
+++ b/target/s390x/tcg/insn-data.def
@@ -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)
-- 
2.37.1



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

* Re: [PATCH] target/s390x: Fix CLFIT and CLGIT immediate size
  2022-08-17 16:15 [PATCH] target/s390x: Fix CLFIT and CLGIT immediate size Ilya Leoshkevich
@ 2022-08-22 13:09 ` Thomas Huth
  2022-08-23 12:53 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2022-08-22 13:09 UTC (permalink / raw)
  To: Ilya Leoshkevich, Richard Henderson, David Hildenbrand,
	Cornelia Huck
  Cc: qemu-s390x, qemu-devel

On 17/08/2022 18.15, Ilya Leoshkevich wrote:
> I2 is 16 bits, not 32.
> 
> Found by running valgrind's none/tests/s390x/traps.
> 
> Fixes: 1c2687518235 ("target-s390: Implement COMPARE AND TRAP")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>   target/s390x/tcg/insn-data.def | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/s390x/tcg/insn-data.def b/target/s390x/tcg/insn-data.def
> index 5e448bb2c4..6d2cfe5fa2 100644
> --- a/target/s390x/tcg/insn-data.def
> +++ b/target/s390x/tcg/insn-data.def
> @@ -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.

Reviewed-by: Thomas Huth <thuth@redhat.com>

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)



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

* Re: [PATCH] target/s390x: Fix CLFIT and CLGIT immediate size
  2022-08-17 16:15 [PATCH] target/s390x: Fix CLFIT and CLGIT immediate size Ilya Leoshkevich
  2022-08-22 13:09 ` Thomas Huth
@ 2022-08-23 12:53 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2022-08-23 12:53 UTC (permalink / raw)
  To: Ilya Leoshkevich, Richard Henderson, Cornelia Huck, Thomas Huth
  Cc: qemu-s390x, qemu-devel

On 17.08.22 18:15, Ilya Leoshkevich wrote:
> I2 is 16 bits, not 32.
> 
> Found by running valgrind's none/tests/s390x/traps.
> 
> Fixes: 1c2687518235 ("target-s390: Implement COMPARE AND TRAP")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  target/s390x/tcg/insn-data.def | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/s390x/tcg/insn-data.def b/target/s390x/tcg/insn-data.def
> index 5e448bb2c4..6d2cfe5fa2 100644
> --- a/target/s390x/tcg/insn-data.def
> +++ b/target/s390x/tcg/insn-data.def
> @@ -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)

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



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

end of thread, other threads:[~2022-08-23 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-17 16:15 [PATCH] target/s390x: Fix CLFIT and CLGIT immediate size Ilya Leoshkevich
2022-08-22 13:09 ` Thomas Huth
2022-08-23 12:53 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).