Skip to contentSkip to conversation

tcg/ppc64: Prepare support for Little Endian ppc64 hosts

PATCH RESEND In review Andreas Färber 2 participants 2 messages Mar 28, 2014

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 tcg/ppc64: Prepare support for Little Endian ppc64 hosts

Don't hardcode TCG_TARGET_WORDS_BIGENDIAN.

---
Unfortunately with this fix, execution of ./i386-softmmu/qemu-system-i386 just gets a SIGSEGV instead of the previous SIGILL on ppc64le.

This TCG breakage affects acpi-test, failing make check.

 tcg/ppc64/tcg-target.h | 2 ++
 1 file changed, 2 insertions(+)
tcg/ppc64/tcg-target.h +2 -0
index 7ee50b6..51355a1 100644
@@ -24,7 +24,9 @@
 #ifndef TCG_TARGET_PPC64 
 #define TCG_TARGET_PPC64 1
 
+#ifndef __LITTLE_ENDIAN__
 #define TCG_TARGET_WORDS_BIGENDIAN
+#endif
 #define TCG_TARGET_NB_REGS 32
 
 typedef enum {
Signature · 1 line
1.8.4.5
#1 lore raw

tcg/ppc64/tcg-target.h line 30

Quoted 5 lines · Andreas Färber
tcg/ppc64/tcg-target.h +2 -0
+#ifndef __LITTLE_ENDIAN__
 #define TCG_TARGET_WORDS_BIGENDIAN
+#endif
 #define TCG_TARGET_NB_REGS 32

Please let's just replace TCG_TARGET_WORDS_BIGENDIAN with HOST_WORDS_BIGENDIAN throughout and be done with it.

r~