From 2c3579ab07408b353fe7083bae9469e1485fc8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 7 Jan 2012 09:45:14 +0100 Subject: memory: Fix memory_region_wrong_endianness() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Aurelien Jarno Signed-off-by: Avi Kivity --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'memory.c') 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; -- cgit v1.2.3