From 7f0b91c261579bbe7d442fdf969d38e0460015c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 4 Oct 2018 04:33:46 -0400 Subject: [PATCH] memory: Use MAKE_64BIT_MASK() Backports commit 36960b4d66d2dd59174f230766d1f4eaffec60a3 from qemu --- qemu/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/memory.c b/qemu/memory.c index 73a97534..f38d506d 100644 --- a/qemu/memory.c +++ b/qemu/memory.c @@ -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,