[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH v2 06/28] s390x/tcg: MVC: Use is_destructive_overlap
From: |
David Hildenbrand |
Subject: |
[qemu-s390x] [PATCH v2 06/28] s390x/tcg: MVC: Use is_destructive_overlap() |
Date: |
Fri, 6 Sep 2019 09:57:28 +0200 |
Let's use the new helper, that also detects destructive overlaps when
wrapping.
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/mem_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 2bc2cd09c1..3c23c403cd 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -330,7 +330,7 @@ static uint32_t do_helper_mvc(CPUS390XState *env, uint32_t
l, uint64_t dest,
*/
if (dest == src + 1) {
fast_memset(env, dest, cpu_ldub_data_ra(env, src, ra), l, ra);
- } else if (dest < src || src + l <= dest) {
+ } else if (!is_destructive_overlap(env, dest, src, l)) {
fast_memmove(env, dest, src, l, ra);
} else {
for (i = 0; i < l; i++) {
--
2.21.0
- [qemu-s390x] [PATCH v2 02/28] s390x/tcg: MVCL: Zero out unused bits of address, (continued)
- [qemu-s390x] [PATCH v2 05/28] s390x/tcg: MVC: Increment the length once, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 06/28] s390x/tcg: MVC: Use is_destructive_overlap(),
David Hildenbrand <=
- [qemu-s390x] [PATCH v2 07/28] s390x/tcg: MVPG: Check for specification exceptions, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 08/28] s390x/tcg: MVPG: Properly wrap the addresses, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 09/28] s390x/tcg: MVCLU/MVCLE: Process max 4k bytes at a time, David Hildenbrand, 2019/09/06
- [qemu-s390x] [PATCH v2 10/28] s390x/tcg: MVCS/MVCP: Check for special operation exceptions, David Hildenbrand, 2019/09/06