diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-24 12:54:01 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-29 16:27:22 +0200 |
commit | 08521e28c7e6e8cc1f53424a0f845f58d2ed9546 (patch) | |
tree | cabda847a709c91d2d2f10514e73b813705ffe38 | |
parent | a014ed07bd5a93950fe12c88ed5faf188a22ee01 (diff) | |
download | hqemu-08521e28c7e6e8cc1f53424a0f845f58d2ed9546.zip hqemu-08521e28c7e6e8cc1f53424a0f845f58d2ed9546.tar.gz |
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: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | memory.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 } } |