about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--sysdeps/arm/fpu_control.h11
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9961dc420e..e3f3f5f01c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-01-19  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #21047]
+	* sysdeps/arm/fpu_control.h [!__SOFTFP__] (_FPU_GETCW): Use VFP
+	name for instruction.
+	[!__SOFTFP__] (_FPU_SETCW): Likewise.
+
 2017-01-18  Joseph Myers  <joseph@codesourcery.com>
 
 	* scripts/build-many-glibcs.py (Config.build_cross_tool): Use -j1
diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h
index d49066c473..405d427c84 100644
--- a/sysdeps/arm/fpu_control.h
+++ b/sysdeps/arm/fpu_control.h
@@ -53,12 +53,19 @@ extern fpu_control_t __fpu_control;
 typedef unsigned int fpu_control_t;
 
 /* Macros for accessing the hardware control word.  */
+#ifdef __SOFTFP__
 /* This is fmrx %0, fpscr.  */
-#define _FPU_GETCW(cw) \
+# define _FPU_GETCW(cw) \
   __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw))
 /* This is fmxr fpscr, %0.  */
-#define _FPU_SETCW(cw) \
+# define _FPU_SETCW(cw) \
   __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))
+#else
+# define _FPU_GETCW(cw) \
+  __asm__ __volatile__ ("vmrs %0, fpscr" : "=r" (cw))
+# define _FPU_SETCW(cw) \
+  __asm__ __volatile__ ("vmsr fpscr, %0" : : "r" (cw))
+#endif
 
 /* Default control word set at startup.  */
 extern fpu_control_t __fpu_control;