1998-01-31 13:28:12 +00:00
|
|
|
/* Linux/i386 version of processor capability information handling macros.
|
2014-01-01 11:03:15 +00:00
|
|
|
Copyright (C) 1998-2014 Free Software Foundation, Inc.
|
1998-01-31 13:28:12 +00:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
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.
|
1998-01-31 13:28:12 +00:00
|
|
|
|
|
|
|
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
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
1998-01-31 13:28:12 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
1998-01-31 13:28:12 +00:00
|
|
|
|
2003-09-25 22:01:15 +00:00
|
|
|
#include <sysdeps/i386/dl-procinfo.h>
|
2001-02-28 06:36:10 +00:00
|
|
|
#include <ldsodefs.h>
|
|
|
|
|
2000-11-15 08:46:30 +00:00
|
|
|
|
* sysdeps/mach/hurd/bits/libc-lock.h
(__libc_cleanup_push, __libc_cleanup_pop): New macros.
2003-08-01 Alfred M. Szmidt <ams@kemisten.nu>
* sysdeps/i386/dl-procinfo.h: New file, contents taken from ...
* sysdeps/unix/sysv/linux/i386/dl-procinfo.h: ... here.
#include_next dl-procinfo.h to get them.
(_DL_HWCAP_COUNT): Moved to sysdeps/i386/dl-procinfo.h.
(_DL_PLATFORMS_COUNT): Likewise.
(_DL_FIRST_PLATFORM): Likewise.
(_DL_HWCAP_PLATFORM): Likewise.
(HWCAP_I386_FPU, HWCAP_I386_VME, HWCAP_I386_DE, HWCAP_I386_PSE,
HWCAP_I386_TSC, HWCAP_I386_MSR, HWCAP_I386_PAE, HWCAP_I386_MCE,
HWCAP_I386_CX8, HWCAP_I386_APIC, HWCAP_I386_SEP, HWCAP_I386_MTRR,
HWCAP_I386_PGE, HWCAP_I386_MCA, HWCAP_I386_CMOV,
HWCAP_I386_FCMOV, HWCAP_I386_MMX, HWCAP_I386_OSFXSR,
HWCAP_I386_XMM, HWCAP_I386_XMM2, HWCAP_I386_AMD3D,
HWCAP_IMPORTANT): Likewise.
(_DL_PROCINFO_H_): Likewise.
(_dl_hwcap_string, _dl_platform_string, _dl_string_hwcap): Likewise.
(_dl_string_platform): Likewise.
* sysdeps/unix/sysv/linux/i386/dl-procinfo.c: Moved to ...
* sysdeps/i386/dl-procinfo.c: ... here, new file.
2003-09-25 03:55:10 +00:00
|
|
|
#undef _dl_procinfo
|
1998-01-31 13:28:12 +00:00
|
|
|
static inline int
|
|
|
|
__attribute__ ((unused))
|
2013-06-28 21:50:48 +00:00
|
|
|
_dl_procinfo (unsigned int type, unsigned long int word)
|
1998-01-31 13:28:12 +00:00
|
|
|
{
|
|
|
|
/* This table should match the information from arch/i386/kernel/setup.c
|
|
|
|
in the kernel sources. */
|
|
|
|
int i;
|
|
|
|
|
2013-06-28 21:50:48 +00:00
|
|
|
/* Fallback to unknown output mechanism. */
|
|
|
|
if (type == AT_HWCAP2)
|
|
|
|
return -1;
|
|
|
|
|
2001-02-28 06:36:10 +00:00
|
|
|
_dl_printf ("AT_HWCAP: ");
|
1998-01-31 13:28:12 +00:00
|
|
|
|
2000-05-05 15:33:39 +00:00
|
|
|
for (i = 0; i < _DL_HWCAP_COUNT; ++i)
|
1998-01-31 13:28:12 +00:00
|
|
|
if (word & (1 << i))
|
2004-03-07 08:39:57 +00:00
|
|
|
_dl_printf (" %s", GLRO(dl_x86_cap_flags)[i]);
|
1998-01-31 13:28:12 +00:00
|
|
|
|
2001-02-28 06:36:10 +00:00
|
|
|
_dl_printf ("\n");
|
1998-01-31 13:28:12 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|