This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, roland/arm-hwcap-vfp, created. glibc-2.16-ports-merge-146-g7ff6b6a


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, roland/arm-hwcap-vfp has been created
        at  7ff6b6a9e25392ecf58ce0892f6c4d756cc02007 (commit)

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ff6b6a9e25392ecf58ce0892f6c4d756cc02007

commit 7ff6b6a9e25392ecf58ce0892f6c4d756cc02007
Author: Roland McGrath <roland@hack.frob.com>
Date:   Wed Aug 8 11:33:36 2012 -0700

    Don't check HWCAP_ARM_VFP in OS-generic code.  Presume VFP if compiled with __VFP_FP__ defined.

diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index 842bbea..31b2f3c 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,3 +1,24 @@
+2012-08-08  Roland McGrath  <roland@hack.frob.com>
+
+	* sysdeps/arm/sysdep.h [__VFP_FP__] (ARM_HAVE_VFP): New macro.
+	* sysdeps/unix/sysv/linux/arm/sysdep.h
+	[!__VFP_FP__ && !__ASSEMBLER__] (ARM_HAVE_VFP): New macro.
+	* sysdeps/arm/fclrexcpt.c: Use ARM_HAVE_VFP instead of hwcap bits.
+	* sysdeps/arm/fedisblxcpt.c: Likewise.
+	* sysdeps/arm/feenablxcpt.c: Likewise.
+	* sysdeps/arm/fegetenv.c: Likewise.
+	* sysdeps/arm/fegetexcept.c: Likewise.
+	* sysdeps/arm/fegetround.c: Likewise.
+	* sysdeps/arm/feholdexcpt.c: Likewise.
+	* sysdeps/arm/fesetenv.c: Likewise.
+	* sysdeps/arm/fesetround.c: Likewise.
+	* sysdeps/arm/feupdateenv.c: Likewise.
+	* sysdeps/arm/fgetexcptflg.c: Likewise.
+	* sysdeps/arm/fraiseexcpt.c: Likewise.
+	* sysdeps/arm/fsetexcptflg.c: Likewise.
+	* sysdeps/arm/ftestexcept.c: Likewise.
+	* sysdeps/arm/setfpucw.c: Likewise.
+
 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/arm/configure.in (arch_minimum_kernel):
diff --git a/ports/sysdeps/arm/fclrexcpt.c b/ports/sysdeps/arm/fclrexcpt.c
index ddedc35..a78d411 100644
--- a/ports/sysdeps/arm/fclrexcpt.c
+++ b/ports/sysdeps/arm/fclrexcpt.c
@@ -1,5 +1,5 @@
 /* Clear given exceptions in current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01,05,11 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 __feclearexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int temp;
 
diff --git a/ports/sysdeps/arm/fedisblxcpt.c b/ports/sysdeps/arm/fedisblxcpt.c
index c9c62a4..9231b67 100644
--- a/ports/sysdeps/arm/fedisblxcpt.c
+++ b/ports/sysdeps/arm/fedisblxcpt.c
@@ -1,5 +1,5 @@
 /* Disable floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@gnu.org>, 2001.
 
@@ -20,15 +20,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 fedisableexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int new_exc, old_exc;
 
diff --git a/ports/sysdeps/arm/feenablxcpt.c b/ports/sysdeps/arm/feenablxcpt.c
index 3b2b934..6e9a952 100644
--- a/ports/sysdeps/arm/feenablxcpt.c
+++ b/ports/sysdeps/arm/feenablxcpt.c
@@ -1,5 +1,5 @@
 /* Enable floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@gnu.org>, 2001.
 
@@ -20,15 +20,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 feenableexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int new_exc, old_exc;
 
diff --git a/ports/sysdeps/arm/fegetenv.c b/ports/sysdeps/arm/fegetenv.c
index c638635..a5bbca5 100644
--- a/ports/sysdeps/arm/fegetenv.c
+++ b/ports/sysdeps/arm/fegetenv.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01,05,10 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 __fegetenv (fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int temp;
       _FPU_GETCW (temp);
diff --git a/ports/sysdeps/arm/fegetexcept.c b/ports/sysdeps/arm/fegetexcept.c
index 929d6c5..fc07de7 100644
--- a/ports/sysdeps/arm/fegetexcept.c
+++ b/ports/sysdeps/arm/fegetexcept.c
@@ -1,5 +1,5 @@
 /* Get floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@gnu.org>, 2001
 
@@ -20,15 +20,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 fegetexcept (void)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long temp;
 
diff --git a/ports/sysdeps/arm/fegetround.c b/ports/sysdeps/arm/fegetround.c
index df10497..1c8832a 100644
--- a/ports/sysdeps/arm/fegetround.c
+++ b/ports/sysdeps/arm/fegetround.c
@@ -1,5 +1,5 @@
 /* Return current rounding direction.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 fegetround (void)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned int temp;
 
diff --git a/ports/sysdeps/arm/feholdexcpt.c b/ports/sysdeps/arm/feholdexcpt.c
index 4aed48b..46e8c0f 100644
--- a/ports/sysdeps/arm/feholdexcpt.c
+++ b/ports/sysdeps/arm/feholdexcpt.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment and clear exceptions.
-   Copyright (C) 1997, 1998, 1999, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 feholdexcept (fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long int temp;
 
diff --git a/ports/sysdeps/arm/fesetenv.c b/ports/sysdeps/arm/fesetenv.c
index 6137032..76bd0e9 100644
--- a/ports/sysdeps/arm/fesetenv.c
+++ b/ports/sysdeps/arm/fesetenv.c
@@ -1,5 +1,5 @@
 /* Install given floating-point environment.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 __fesetenv (const fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned int temp;
 
diff --git a/ports/sysdeps/arm/fesetround.c b/ports/sysdeps/arm/fesetround.c
index 997bd98..6659456 100644
--- a/ports/sysdeps/arm/fesetround.c
+++ b/ports/sysdeps/arm/fesetround.c
@@ -1,5 +1,5 @@
 /* Set current rounding direction.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 fesetround (int round)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       fpu_control_t temp;
 
diff --git a/ports/sysdeps/arm/feupdateenv.c b/ports/sysdeps/arm/feupdateenv.c
index 98f2654..45f064b 100644
--- a/ports/sysdeps/arm/feupdateenv.c
+++ b/ports/sysdeps/arm/feupdateenv.c
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 1999, 2000, 2008, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -20,15 +20,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 __feupdateenv (const fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned int temp;
 
diff --git a/ports/sysdeps/arm/fgetexcptflg.c b/ports/sysdeps/arm/fgetexcptflg.c
index 41661a2..4e1b74e 100644
--- a/ports/sysdeps/arm/fgetexcptflg.c
+++ b/ports/sysdeps/arm/fgetexcptflg.c
@@ -1,5 +1,5 @@
 /* Store current representation for exceptions.
-   Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -20,15 +20,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 __fegetexceptflag (fexcept_t *flagp, int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       unsigned long temp;
 
diff --git a/ports/sysdeps/arm/fraiseexcpt.c b/ports/sysdeps/arm/fraiseexcpt.c
index 0a43688..7cfffb6 100644
--- a/ports/sysdeps/arm/fraiseexcpt.c
+++ b/ports/sysdeps/arm/fraiseexcpt.c
@@ -1,5 +1,5 @@
 /* Raise given exceptions.
-   Copyright (C) 2004, 2005, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,15 +20,12 @@
 #include <fenv.h>
 #include <float.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 feraiseexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       int fpscr;
       const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
diff --git a/ports/sysdeps/arm/fsetexcptflg.c b/ports/sysdeps/arm/fsetexcptflg.c
index bee51a9..ff31bf4 100644
--- a/ports/sysdeps/arm/fsetexcptflg.c
+++ b/ports/sysdeps/arm/fsetexcptflg.c
@@ -1,5 +1,5 @@
 /* Set floating-point environment exception handling.
-   Copyright (C) 1997,98,99,2000,01,05,08,11 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,15 +20,12 @@
 #include <math.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 __fesetexceptflag (const fexcept_t *flagp, int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       fexcept_t temp;
 
diff --git a/ports/sysdeps/arm/ftestexcept.c b/ports/sysdeps/arm/ftestexcept.c
index 06817d2..f4b20a0 100644
--- a/ports/sysdeps/arm/ftestexcept.c
+++ b/ports/sysdeps/arm/ftestexcept.c
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 1998, 2005, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,12 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 int
 fetestexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       fexcept_t temp;
 
diff --git a/ports/sysdeps/arm/setfpucw.c b/ports/sysdeps/arm/setfpucw.c
index d0cea32..6aa8509 100644
--- a/ports/sysdeps/arm/setfpucw.c
+++ b/ports/sysdeps/arm/setfpucw.c
@@ -1,5 +1,5 @@
 /* Set the FPU control word.
-   Copyright (C) 1996, 1997, 1999, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1996-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,12 @@
 #include <math.h>
 #include <fpu_control.h>
 
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
 #include <sysdep.h>
 
 void
 __setfpucw (fpu_control_t set)
 {
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+  if (ARM_HAVE_VFP)
     {
       fpu_control_t cw;
 
diff --git a/ports/sysdeps/arm/sysdep.h b/ports/sysdeps/arm/sysdep.h
index 6ec2bd6..cad7b9c 100644
--- a/ports/sysdeps/arm/sysdep.h
+++ b/ports/sysdeps/arm/sysdep.h
@@ -25,6 +25,16 @@
 # define __USE_BX__
 #endif
 
+/* If we don't define it here, the OS-specific sysdep.h file should define
+   ARM_HAVE_VFP to an appropriate expression for testing at runtime whether
+   the VFP hardware is present.  */
+#ifdef __VFP_FP__
+/* The compiler is generating VFP instructions, so we're already
+   assuming the hardware exists.  */
+# undef ARM_HAVE_VFP
+# define ARM_HAVE_VFP	1
+#endif
+
 #ifdef	__ASSEMBLER__
 
 /* Syntactic details of assembler.  */
diff --git a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
index 30fa599..f9086c4 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -43,6 +43,11 @@
 #define _SYS_AUXV_H 1
 #include <bits/hwcap.h>
 
+#if !defined __VFP_FP__ && !defined __ASSEMBLER__
+# include <ldsodefs.h>
+# define ARM_HAVE_VFP	(GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+#endif
+
 #ifdef __ASSEMBLER__
 
 /* Linux uses a negative return value to indicate syscall errors,

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]