aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-01-07 09:45:14 +0100
committerAvi Kivity <avi@redhat.com>2012-01-08 13:10:09 +0200
commit2c3579ab07408b353fe7083bae9469e1485fc8fc (patch)
tree55c0b96681547f824708f4f31c9d36fe1ffebc94 /memory.c
parent6148b23d69444a300710db0c53f6c53b7f3c8067 (diff)
memory: Fix memory_region_wrong_endianness()
Since commit be675c972088eba210e18dc125613e9f205a6bfb (memory: move endianness compensation to memory core) it was checking for TARGET_BIG_ENDIAN instead of TARGET_WORDS_BIGENDIAN, thereby not swapping correctly for Big Endian targets. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index 394cbab10e..5e55a9019e 100644
--- a/memory.c
+++ b/memory.c
@@ -843,7 +843,7 @@ static void memory_region_destructor_rom_device(MemoryRegion *mr)
static bool memory_region_wrong_endianness(MemoryRegion *mr)
{
-#ifdef TARGET_BIG_ENDIAN
+#ifdef TARGET_WORDS_BIGENDIAN
return mr->ops->endianness == DEVICE_LITTLE_ENDIAN;
#else
return mr->ops->endianness == DEVICE_BIG_ENDIAN;