[vlc-commits] ARM: detect VFP floating point unit

Rémi Denis-Courmont git at videolan.org
Thu Jan 26 19:28:08 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan 25 18:00:10 2012 +0200| [cf5a82224a3db25ed078f7d441257da51b346990] | committer: Rémi Denis-Courmont

ARM: detect VFP floating point unit

This sets HAVE_FPU correctly on ARM targets if VFP instructions are
enabled. Note that __VFP_FP__ implies the use of the VFP floating point
format, not the availability of the VFP instructions. Thus software
floating emulation __SOFTFP__ (i.e. gcc -mfloat-abi=soft) is excluded
explicitly.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf5a82224a3db25ed078f7d441257da51b346990
---

 include/vlc_cpu.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/vlc_cpu.h b/include/vlc_cpu.h
index 63cc978..36f8da5 100644
--- a/include/vlc_cpu.h
+++ b/include/vlc_cpu.h
@@ -91,7 +91,11 @@ VLC_API unsigned vlc_CPU( void );
 #  define HAVE_FPU 1
 
 # elif defined (__arm__)
-#  define HAVE_FPU 0 /* revisit later? */
+#  if defined (__VFP_FP__) && !defined (__SOFTFP__)
+#   define HAVE_FPU 1
+#  else
+#   define HAVE_FPU 0
+#  endif
 
 # elif defined (__sparc__)
 #  define HAVE_FPU 1



More information about the vlc-commits mailing list