Back to index

glibc  2.9
dl-procinfo.h
Go to the documentation of this file.
00001 /* Linux/ARM version of processor capability information handling macros.
00002    Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004    Contributed by Philip Blundell <philb@gnu.org>, 2001.
00005 
00006    The GNU C Library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2.1 of the License, or (at your option) any later version.
00010 
00011    The GNU C Library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with the GNU C Library; if not, write to the Free
00018    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019    02111-1307 USA.  */
00020 
00021 #ifndef _DL_PROCINFO_H
00022 #define _DL_PROCINFO_H      1
00023 
00024 #include <ldsodefs.h>
00025 #include <sysdep.h>
00026 
00027 #define _DL_HWCAP_COUNT 10
00028 
00029 /* The kernel provides platform data but it is not interesting.  */
00030 #define _DL_HWCAP_PLATFORM  0
00031 
00032 
00033 static inline int
00034 __attribute__ ((unused))
00035 _dl_procinfo (int word)
00036 {
00037   int i;
00038 
00039   _dl_printf ("AT_HWCAP:   ");
00040 
00041   for (i = 0; i < _DL_HWCAP_COUNT; ++i)
00042     if (word & (1 << i))
00043       _dl_printf (" %s", GLRO(dl_arm_cap_flags)[i]);
00044 
00045   _dl_printf ("\n");
00046 
00047   return 0;
00048 }
00049 
00050 static inline const char *
00051 __attribute__ ((unused))
00052 _dl_hwcap_string (int idx)
00053 {
00054   return GLRO(dl_arm_cap_flags)[idx];
00055 };
00056 
00057 #define HWCAP_IMPORTANT            (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
00058 
00059 static inline int
00060 __attribute__ ((unused))
00061 _dl_string_hwcap (const char *str)
00062 {
00063   int i;
00064 
00065   for (i = 0; i < _DL_HWCAP_COUNT; i++)
00066     {
00067       if (strcmp (str, GLRO(dl_arm_cap_flags)[i]) == 0)
00068        return i;
00069     }
00070   return -1;
00071 };
00072 
00073 #define _dl_string_platform(str) (-1)
00074 
00075 #endif /* dl-procinfo.h */