memory: Use MAKE_64BIT_MASK()
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180927002416.1781-2-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d41ca5afe3
commit
36960b4d66
2
memory.c
2
memory.c
@ -582,7 +582,7 @@ static MemTxResult access_with_adjusted_size(hwaddr addr,
|
||||
|
||||
/* FIXME: support unaligned access? */
|
||||
access_size = MAX(MIN(size, access_size_max), access_size_min);
|
||||
access_mask = -1ULL >> (64 - access_size * 8);
|
||||
access_mask = MAKE_64BIT_MASK(0, access_size * 8);
|
||||
if (memory_region_big_endian(mr)) {
|
||||
for (i = 0; i < size; i += access_size) {
|
||||
r |= access_fn(mr, addr + i, value, access_size,
|
||||
|
Loading…
Reference in New Issue
Block a user