Commit 08521e28 authored by Paolo Bonzini's avatar Paolo Bonzini

memory: add big endian support to access_with_adjusted_size

This will be used to split 8-byte access down to two four-byte accesses.
Reviewed-by: default avatarRichard Henderson <rth@twiddle.net>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a014ed07
......@@ -362,8 +362,12 @@ static void access_with_adjusted_size(hwaddr addr,
access_size = MAX(MIN(size, access_size_max), access_size_min);
access_mask = -1ULL >> (64 - access_size * 8);
for (i = 0; i < size; i += access_size) {
/* FIXME: big-endian support */
#ifdef TARGET_WORDS_BIGENDIAN
access(opaque, addr + i, value, access_size,
(size - access_size - i) * 8, access_mask);
#else
access(opaque, addr + i, value, access_size, i * 8, access_mask);
#endif
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment