diff options
-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 } } |