mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 13:29:06 +00:00
memory: avoid a name clash with access macro
This avoids a name clash with the access macro on windows 64: make CHK version_gen.h CC aarch64-softmmu/memory.o /home/konrad/qemu/memory.c: In function 'access_with_adjusted_size': /home/konrad/qemu/memory.c:591:73: error: macro "access" passed 7 arguments, \ but takes just 2 (size - access_size - i) * 8, access_mask, attrs); ^ Backports commit 05e015f73c3b5c50c237d3d8e555e25cfa543a5c from qemu
This commit is contained in:
parent
4956effd11
commit
61ecdd1032
1 changed files with 12 additions and 11 deletions
|
@ -521,7 +521,8 @@ static MemTxResult access_with_adjusted_size(hwaddr addr,
|
||||||
unsigned size,
|
unsigned size,
|
||||||
unsigned access_size_min,
|
unsigned access_size_min,
|
||||||
unsigned access_size_max,
|
unsigned access_size_max,
|
||||||
MemTxResult (*access)(MemoryRegion *mr,
|
MemTxResult (*access_fn)
|
||||||
|
(MemoryRegion *mr,
|
||||||
hwaddr addr,
|
hwaddr addr,
|
||||||
uint64_t *value,
|
uint64_t *value,
|
||||||
unsigned size,
|
unsigned size,
|
||||||
|
@ -548,12 +549,12 @@ static MemTxResult access_with_adjusted_size(hwaddr addr,
|
||||||
access_mask = (0-1ULL) >> (64 - access_size * 8);
|
access_mask = (0-1ULL) >> (64 - access_size * 8);
|
||||||
if (memory_region_big_endian(mr)) {
|
if (memory_region_big_endian(mr)) {
|
||||||
for (i = 0; i < size; i += access_size) {
|
for (i = 0; i < size; i += access_size) {
|
||||||
r |= access(mr, addr + i, value, access_size,
|
r |= access_fn(mr, addr + i, value, access_size,
|
||||||
(size - access_size - i) * 8, access_mask, attrs);
|
(size - access_size - i) * 8, access_mask, attrs);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < size; i += access_size) {
|
for (i = 0; i < size; i += access_size) {
|
||||||
r |= access(mr, addr + i, value, access_size, i * 8,
|
r |= access_fn(mr, addr + i, value, access_size, i * 8,
|
||||||
access_mask, attrs);
|
access_mask, attrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue