Skip to contentSkip to conversation

Byte swapping bug in arm semihosting

PATCH New Paul Brook 1 participant 1 message Aug 13, 2005

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

PATCH 1/1 Byte swapping bug in arm semihosting

The patch below fixes a duplicate byte swap in the arm semihosting implementation. ARG(x) already does the endian correction.

Paul
Index: linux-user//arm-semi.c
===================================================================
RCS file: /cvsroot/qemu/qemu/linux-user/arm-semi.c,v retrieving revision 1.3

/arm-semi.c +1 -1
diff -u -p -r1.3 arm-semi.c
@@ -178,7 +178,7 @@ uint32_t do_arm_semihosting(CPUState *en
                 ts->heap_limit = limit;
             }
               
-            ptr = (uint32_t *)tswap32(ARG(0));
+            ptr = (uint32_t *)ARG(0);
             ptr[0] = tswap32(ts->heap_base);
             ptr[1] = tswap32(ts->heap_limit);
             ptr[2] = tswap32(ts->stack_base);