[vlc-commits] ARM: detect VFP floating point unit
Rémi Denis-Courmont
git at videolan.org
Fri Jan 27 19:30:03 CET 2012
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan 25 18:00:10 2012 +0200| [75755f42816a13665d1c8c60d9cff8dd5c4e49a1] | committer: Jean-Baptiste Kempf
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.
(cherry picked from commit cf5a82224a3db25ed078f7d441257da51b346990)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=75755f42816a13665d1c8c60d9cff8dd5c4e49a1
---
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