summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2019-09-04 11:30:29 +0200
committerDavid Hildenbrand <david@redhat.com>2019-09-23 09:28:29 +0200
commitb7809f369266d6cc1a253688f80a66bfbce9e6dd (patch)
tree1ec59da35a7659d62da30cef6b896ea98b834a52 /target
parentefb1a76ef9e39b4a5628a27f0f1df74336f8d240 (diff)
downloadqemu-b7809f369266d6cc1a253688f80a66bfbce9e6dd.zip
s390x/tcg: MVC: Fault-safe handling on destructive overlaps
The last remaining bit for MVC is handling destructive overlaps in a fault-safe way. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/s390x/mem_helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 04c4228f13..aed53a37da 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -438,8 +438,9 @@ static uint32_t do_helper_mvc(CPUS390XState *env, uint32_t l, uint64_t dest,
access_memmove(env, &desta, &srca, ra);
} else {
for (i = 0; i < l; i++) {
- uint8_t x = cpu_ldub_data_ra(env, src + i, ra);
- cpu_stb_data_ra(env, dest + i, x, ra);
+ uint8_t byte = access_get_byte(env, &srca, i, ra);
+
+ access_set_byte(env, &desta, i, byte, ra);
}
}