From 09ba9099c1562c4af1e2f624b9aa2692e563118b Mon Sep 17 00:00:00 2001 From: Jiri Gaisler Date: Sat, 29 Feb 2020 11:07:13 +0100 Subject: Fix incorrect operation on big-endian hosts --- interf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'interf.c') diff --git a/interf.c b/interf.c index 8a35db9..672388c 100644 --- a/interf.c +++ b/interf.c @@ -88,7 +88,7 @@ sim_write (uint32 mem, const char *buf, int length) for (i = 0; i < length; i++) { - ms->sis_memory_write ((mem + i) ^ arch->endian, &buf[i], 1); + ms->sis_memory_write ((mem + i) ^ arch->bswap, &buf[i], 1); } return length; } @@ -105,7 +105,7 @@ sim_read (uint32 mem, char *buf, int length) } for (i = 0; i < length; i++) { - ms->sis_memory_read ((mem + i) ^ arch->endian, &buf[i], 1); + ms->sis_memory_read ((mem + i) ^ arch->bswap, &buf[i], 1); } return length; } -- cgit v1.2.3