Patchwork [v5,14/21] linux-user: Make sure NWFPE code is 32 bit ARM only

login
register
mail settings
Submitter Peter Maydell
Date July 1, 2013, 5:35 p.m.
Message ID <1372700120-8896-15-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/256190/
State New
Headers show

Comments

Peter Maydell - July 1, 2013, 5:35 p.m.
On ARM, linux-user emulation includes NWFPE support for emulating the
ancient FPA floating point coprocessor. This has long since been
superseded by VFP and is only required for legacy binaries. The
AArch64 linux-user target doesn't compile in NWFPE support, so make
sure the relevant code is protected by suitable ifdefs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/qemu.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index b10e957..d51d827 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -79,7 +79,7 @@  struct vm86_saved_state {
 };
 #endif
 
-#ifdef TARGET_ARM
+#if defined(TARGET_ARM) && defined(TARGET_ABI32)
 /* FPU emulator */
 #include "nwfpe/fpa11.h"
 #endif
@@ -103,8 +103,10 @@  struct emulated_sigtable {
 typedef struct TaskState {
     pid_t ts_tid;     /* tid (or pid) of this task */
 #ifdef TARGET_ARM
+# ifdef TARGET_ABI32
     /* FPA state */
     FPA11 fpa;
+# endif
     int swi_errno;
 #endif
 #ifdef TARGET_UNICORE32