memory: Access MemoryRegion with endianness

Preparation for collapsing the two byte swaps adjust_endianness and
handle_bswap into the former.

Call memory_region_dispatch_{read|write} with endianness encoded into
the "MemOp op" operand.

This patch does not change any behaviour as
memory_region_dispatch_{read|write} is yet to handle the endianness.

Once it does handle endianness, callers with byte swaps can collapse
them into adjust_endianness.

Backports commit d5d680cacc66ef7e3c02c81dc8f3a34eabce6dfe from qemu
This commit is contained in:
Tony Nguyen 2020-01-07 18:52:02 -05:00 committed by Lioncash
parent b335c4756a
commit da98d0da4e
21 changed files with 71 additions and 10 deletions

View file

@ -1434,6 +1434,9 @@ address_space_write_cached(MemoryRegionCache *cache, hwaddr addr,
void unicorn_free_empty_flat_view(struct uc_struct *uc);
/* enum device_endian to MemOp. */
MemOp devend_memop(enum device_endian end);
#endif
#endif