mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
memory: correctly handle endian-swapped 64-bit accesses
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ce5d2f331e
commit
968a5627c8
2 changed files with 12 additions and 3 deletions
3
memory.c
3
memory.c
|
@ -957,6 +957,9 @@ static void adjust_endianness(MemoryRegion *mr, uint64_t *data, unsigned size)
|
|||
case 4:
|
||||
*data = bswap32(*data);
|
||||
break;
|
||||
case 8:
|
||||
*data = bswap64(*data);
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue