Re: [Qemu-devel] [PATCH v2 11/28] s390x/tcg: MVCS/MVCP: Properly wrap the length

2019-09-11 Thread David Hildenbrand
On 11.09.19 17:11, Richard Henderson wrote: > On 9/6/19 3:57 AM, David Hildenbrand wrote: >> +l = wrap_length(env, l); >> if (l > 256) { >> /* max 256 */ >> l = 256; >> cc = 3; >> +} else if (!l) { >> +return cc; >> } > > Um, wrap_length only

Re: [Qemu-devel] [PATCH v2 11/28] s390x/tcg: MVCS/MVCP: Properly wrap the length

2019-09-11 Thread Richard Henderson
On 9/6/19 3:57 AM, David Hildenbrand wrote: > +l = wrap_length(env, l); > if (l > 256) { > /* max 256 */ > l = 256; > cc = 3; > +} else if (!l) { > +return cc; > } Um, wrap_length only takes 31 bits. These insns take 32 bits in 24/31-bit modes.

[Qemu-devel] [PATCH v2 11/28] s390x/tcg: MVCS/MVCP: Properly wrap the length

2019-09-06 Thread David Hildenbrand
... and don't perform any move in case the length is zero. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 041d01d63d..de5e69b500 100644 ---