1998-01-31 13:28:12 +00:00
|
|
|
/* Linux/i386 version of processor capability information handling macros.
|
2003-06-13 21:05:42 +00:00
|
|
|
Copyright (C) 1998-2002, 2003 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
|
|
|
|
License along with the GNU C Library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
02111-1307 USA. */
|
1998-01-31 13:28:12 +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
|
|
|
#include_next <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))
|
|
|
|
_dl_procinfo (int word)
|
|
|
|
{
|
|
|
|
/* This table should match the information from arch/i386/kernel/setup.c
|
|
|
|
in the kernel sources. */
|
|
|
|
int i;
|
|
|
|
|
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))
|
2002-02-01 07:49:47 +00:00
|
|
|
_dl_printf (" %s", GL(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;
|
|
|
|
}
|