On 12/19/25 08:28, Philippe Mathieu-Daudé wrote:
Replace the ldn_he_p/stn_he_p() calls by their explicit endianness
variants. Duplicate the MemoryRegionOps, using one entry for BIG
and another for LITTLE endianness. Select the proper MemoryRegionOps
in memory_region_init_ram_device_ptr().
...
-static const MemoryRegionOps ram_device_mem_ops = {
- .read = memory_region_ram_device_read,
- .write = memory_region_ram_device_write,
- .endianness = HOST_BIG_ENDIAN ? DEVICE_BIG_ENDIAN : DEVICE_LITTLE_ENDIAN,
How is the choice here different than ...
- mr->ops = &ram_device_mem_ops;
+ mr->ops = &ram_device_mem_ops[HOST_BIG_ENDIAN];
... here?
One of those two sets of functions is always dead.
r~