diff options
author | Andreas Jaeger <aj@suse.de> | 2000-11-15 08:46:30 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2000-11-15 08:46:30 +0000 |
commit | a6c1c03a440ec55e427844ba851eed1ea2c95c95 (patch) | |
tree | fd63a016f9ad7a0bbd35a3848864560ce11fa9bd /sysdeps/unix/sysv/linux/i386/dl-procinfo.h | |
parent | ad1a5cc746c507ddd9b31cae653aefe3fac7a249 (diff) | |
download | glibc-a6c1c03a440ec55e427844ba851eed1ea2c95c95.tar.gz glibc-a6c1c03a440ec55e427844ba851eed1ea2c95c95.tar.xz glibc-a6c1c03a440ec55e427844ba851eed1ea2c95c95.zip |
Update.
2000-11-15 Andreas Jaeger <aj@suse.de> * elf/cache.c (struct cache_entry): Use uint64_t for hwcap. (print_entry): Likewise. (add_to_cache): Likewise. * elf/ldconfig.h (add_to_cache): Change prototype for hwcap change. * elf/ldconfig.c (struct lib_entry): Use uint64_t for hwcap. (path_hwcap): Likewise. (search_dir): Likewise. * sysdeps/generic/dl-cache.c (HWCAP_CHECK): Handle platform. * elf/cache.c (add_to_cache): Handle 64 bit hwcap entry. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h (_dl_platform_string): New. (_DL_HWCAP_PLATFORM): New. (_dl_string_platform): New. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise. * sysdeps/generic/dl-procinfo.h (_DL_HWCAP_COUNT): New. (_dl_string_platform): New. (_DL_HWCAP_PLATFORM): New. (_dl_platform_string): New. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Added x86 platform recognition. (_DL_HWCAP_COUNT): New. (_dl_string_platform): New. (_DL_HWCAP_PLATFORM): New. (_dl_platform_string): New.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/dl-procinfo.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/dl-procinfo.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h index c4a4e324e6..55bd830011 100644 --- a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h @@ -32,6 +32,18 @@ static const char x86_cap_flags[][7] = }; #define _DL_HWCAP_COUNT 32 +static const char x86_platforms[][5] = + { + "i386", "i486", "i586", "i686" + }; +#define _DL_PLATFORMS_COUNT 4 + +/* Start at 48 to reserve some space. */ +#define _DL_FIRST_PLATFORM 48 +/* Mask to filter out platforms. */ +#define _DL_HWCAP_PLATFORM (7ULL << _DL_FIRST_PLATFORM) + + static inline int __attribute__ ((unused)) _dl_procinfo (int word) @@ -58,6 +70,13 @@ _dl_hwcap_string (int idx) return x86_cap_flags[idx]; }; +static inline const char * +__attribute__ ((unused)) +_dl_platform_string (int idx) +{ + return x86_platforms [idx - _DL_FIRST_PLATFORM]; +}; + enum { HWCAP_I386_FPU = 1 << 0, @@ -82,6 +101,7 @@ enum /* XXX Which others to add here? */ HWCAP_IMPORTANT = (HWCAP_I386_MMX) + }; static inline int @@ -98,4 +118,20 @@ _dl_string_hwcap (const char *str) return -1; }; + +static inline int +__attribute__ ((unused)) +_dl_string_platform (const char *str) +{ + int i; + + if (str != NULL) + for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) + { + if (strcmp (str, x86_platforms[i]) == 0) + return _DL_FIRST_PLATFORM + i; + } + return -1; +}; + #endif /* dl-procinfo.h */ |