1 | /* Linux/i386 version of processor capability information handling macros. |
2 | Copyright (C) 1998-2022 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. |
4 | |
5 | The GNU C Library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either |
8 | version 2.1 of the License, or (at your option) any later version. |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU Lesser General Public |
16 | License along with the GNU C Library; if not, see |
17 | <https://www.gnu.org/licenses/>. */ |
18 | |
19 | #ifndef _DL_I386_PROCINFO_H |
20 | #define _DL_I386_PROCINFO_H 1 |
21 | #include <sysdeps/x86/dl-procinfo.h> |
22 | |
23 | #undef _dl_procinfo |
24 | static inline int |
25 | __attribute__ ((unused)) |
26 | _dl_procinfo (unsigned int type, unsigned long int word) |
27 | { |
28 | /* This table should match the information from arch/i386/kernel/setup.c |
29 | in the kernel sources. */ |
30 | int i; |
31 | |
32 | /* Fallback to generic output mechanism. */ |
33 | if (type != AT_HWCAP) |
34 | return -1; |
35 | |
36 | _dl_printf ("AT_HWCAP: " ); |
37 | |
38 | for (i = 0; i < 32; ++i) |
39 | if (word & (1 << i)) |
40 | _dl_printf (" %s" , GLRO(dl_x86_cap_flags)[i]); |
41 | |
42 | _dl_printf ("\n" ); |
43 | |
44 | return 0; |
45 | } |
46 | #endif |
47 | |