memory: Use MAKE_64BIT_MASK()

Backports commit 36960b4d66d2dd59174f230766d1f4eaffec60a3 from qemu
This commit is contained in:
Philippe Mathieu-Daudé 2018-10-04 04:33:46 -04:00 committed by Lioncash
parent 461fbaa9eb
commit 7f0b91c261
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -581,7 +581,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 = (0-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,