From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21077 invoked by alias); 21 May 2012 10:47:13 -0000 Received: (qmail 21028 invoked by uid 22791); 21 May 2012 10:47:07 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_HW X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 May 2012 10:46:54 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1SWQ8b-0003rq-PZ from joseph_myers@mentor.com for libc-ports@sourceware.org; Mon, 21 May 2012 03:46:53 -0700 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 21 May 2012 11:46:52 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1SWQ8Y-0000m9-UY for libc-ports@sourceware.org; Mon, 21 May 2012 10:46:50 +0000 Date: Mon, 21 May 2012 10:47:00 -0000 From: "Joseph S. Myers" To: libc-ports@sourceware.org Subject: Update ARM hwcap code Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00121.txt.bz2 I've applied this patch to update the ARM port's hwcap code. The patch adds a bits/hwcap.h header. Since the Linux kernel now has four more ARM hwcap values that weren't listed in glibc, I also added those to bits/hwcap.h and dl-procinfo.c. 2012-05-21 Joseph Myers * sysdeps/unix/sysv/linux/arm/bits/hwcap.h: New file. Macros taken from sysdeps/unix/sysv/linux/arm/sysdep.h. (HWCAP_ARM_TLS): New macro. (HWCAP_ARM_VFPv4): Likewise. (HWCAP_ARM_IDIVA): Likewise. (HWCAP_ARM_IDIVT): Likewise. * sysdeps/unix/sysv/linux/arm/sysdep.h: Include . (HWCAP_ARM_SWP): Remove macro. Moved to . (HWCAP_ARM_HALF): Likewise. (HWCAP_ARM_THUMB): Likewise. (HWCAP_ARM_26BIT): Likewise. (HWCAP_ARM_FAST_MULT): Likewise. (HWCAP_ARM_FPA): Likewise. (HWCAP_ARM_VFP): Likewise. (HWCAP_ARM_EDSP): Likewise. (HWCAP_ARM_JAVA): Likewise. (HWCAP_ARM_IWMMXT): Likewise. (HWCAP_ARM_CRUNCH): Likewise. (HWCAP_ARM_THUMBEE): Likewise. (HWCAP_ARM_NEON): Likewise. (HWCAP_ARM_VFPv3): Likewise. (HWCAP_ARM_VFPv3D16): Likewise. * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags): Add "tls", "vfpv4", "idiva" and "idivt". * sysdeps/unix/sysv/linux/arm/dl-procinfo.h (_DL_HWCAP_COUNT): Increase to 19. diff --git a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h new file mode 100644 index 0000000..ddfed85 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h @@ -0,0 +1,42 @@ +/* Defines for bits in AT_HWCAP. ARM Linux version. + Copyright (C) 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_AUXV_H +# error "Never include directly; use instead." +#endif + +/* The following must match the kernel's . */ +#define HWCAP_ARM_SWP 1 +#define HWCAP_ARM_HALF 2 +#define HWCAP_ARM_THUMB 4 +#define HWCAP_ARM_26BIT 8 +#define HWCAP_ARM_FAST_MULT 16 +#define HWCAP_ARM_FPA 32 +#define HWCAP_ARM_VFP 64 +#define HWCAP_ARM_EDSP 128 +#define HWCAP_ARM_JAVA 256 +#define HWCAP_ARM_IWMMXT 512 +#define HWCAP_ARM_CRUNCH 1024 +#define HWCAP_ARM_THUMBEE 2048 +#define HWCAP_ARM_NEON 4096 +#define HWCAP_ARM_VFPv3 8192 +#define HWCAP_ARM_VFPv3D16 16384 +#define HWCAP_ARM_TLS 32768 +#define HWCAP_ARM_VFPv4 65536 +#define HWCAP_ARM_IDIVA 131072 +#define HWCAP_ARM_IDIVT 262144 diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c index 64a4444..227492e 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c @@ -1,5 +1,5 @@ /* Data for Linux/ARM version of processor capability information. - Copyright (C) 2001, 2002, 2003, 2006 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 , 2001. @@ -46,12 +46,13 @@ #if !defined PROCINFO_DECL && defined SHARED ._dl_arm_cap_flags #else -PROCINFO_CLASS const char _dl_arm_cap_flags[15][10] +PROCINFO_CLASS const char _dl_arm_cap_flags[19][10] #endif #ifndef PROCINFO_DECL = { "swp", "half", "thumb", "26bit", "fastmult", "fpa", "vfp", "edsp", "java", "iwmmxt", "crunch", "thumbee", "neon", "vfpv3", "vfpv3d16", + "tls", "vfpv4", "idiva", "idivt", } #endif #if !defined SHARED || defined PROCINFO_DECL diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h index 7fe6674..bea7100 100644 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h @@ -1,5 +1,5 @@ /* Linux/ARM version of processor capability information handling macros. - Copyright (C) 2001, 2002, 2004, 2006 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 , 2001. @@ -23,7 +23,7 @@ #include #include -#define _DL_HWCAP_COUNT 15 +#define _DL_HWCAP_COUNT 19 /* The kernel provides platform data but it is not interesting. */ #define _DL_HWCAP_PLATFORM 0 diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index ef83ec2..30fa599 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -40,23 +40,8 @@ #undef SYS_ify #define SYS_ify(syscall_name) (__NR_##syscall_name) - -/* The following must match the kernel's . */ -#define HWCAP_ARM_SWP 1 -#define HWCAP_ARM_HALF 2 -#define HWCAP_ARM_THUMB 4 -#define HWCAP_ARM_26BIT 8 -#define HWCAP_ARM_FAST_MULT 16 -#define HWCAP_ARM_FPA 32 -#define HWCAP_ARM_VFP 64 -#define HWCAP_ARM_EDSP 128 -#define HWCAP_ARM_JAVA 256 -#define HWCAP_ARM_IWMMXT 512 -#define HWCAP_ARM_CRUNCH 1024 -#define HWCAP_ARM_THUMBEE 2048 -#define HWCAP_ARM_NEON 4096 -#define HWCAP_ARM_VFPv3 8192 -#define HWCAP_ARM_VFPv3D16 16384 +#define _SYS_AUXV_H 1 +#include #ifdef __ASSEMBLER__ -- Joseph S. Myers joseph@codesourcery.com