mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
elf: Remove hwcap parameter from add_to_cache signature
Last commit made it so that the value passed for that parameter was always 0 at its only call site. Signed-off-by: Javier Pello <devel@otheo.eu> Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
b78ff5a25d
commit
4a7094119c
3 changed files with 5 additions and 16 deletions
16
elf/cache.c
16
elf/cache.c
|
@ -764,7 +764,7 @@ save_cache (const char *cache_name)
|
||||||
/* Add one library to the cache. */
|
/* Add one library to the cache. */
|
||||||
void
|
void
|
||||||
add_to_cache (const char *path, const char *filename, const char *soname,
|
add_to_cache (const char *path, const char *filename, const char *soname,
|
||||||
int flags, unsigned int isa_level, uint64_t hwcap,
|
int flags, unsigned int isa_level,
|
||||||
struct glibc_hwcaps_subdirectory *hwcaps)
|
struct glibc_hwcaps_subdirectory *hwcaps)
|
||||||
{
|
{
|
||||||
struct cache_entry *new_entry = xmalloc (sizeof (*new_entry));
|
struct cache_entry *new_entry = xmalloc (sizeof (*new_entry));
|
||||||
|
@ -782,22 +782,12 @@ add_to_cache (const char *path, const char *filename, const char *soname,
|
||||||
new_entry->path = path_interned;
|
new_entry->path = path_interned;
|
||||||
new_entry->flags = flags;
|
new_entry->flags = flags;
|
||||||
new_entry->isa_level = isa_level;
|
new_entry->isa_level = isa_level;
|
||||||
new_entry->hwcap = hwcap;
|
new_entry->hwcap = 0;
|
||||||
new_entry->hwcaps = hwcaps;
|
new_entry->hwcaps = hwcaps;
|
||||||
new_entry->bits_hwcap = 0;
|
new_entry->bits_hwcap = 0;
|
||||||
|
|
||||||
if (hwcaps != NULL)
|
if (hwcaps != NULL)
|
||||||
{
|
hwcaps->used = true;
|
||||||
assert (hwcap == 0);
|
|
||||||
hwcaps->used = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Count the number of bits set in the masked value. */
|
|
||||||
for (size_t i = 0;
|
|
||||||
(~((1ULL << i) - 1) & hwcap) != 0 && i < 8 * sizeof (hwcap); ++i)
|
|
||||||
if ((hwcap & (1ULL << i)) != 0)
|
|
||||||
++new_entry->bits_hwcap;
|
|
||||||
|
|
||||||
|
|
||||||
/* Keep the list sorted - search for right place to insert. */
|
/* Keep the list sorted - search for right place to insert. */
|
||||||
struct cache_entry *ptr = entries;
|
struct cache_entry *ptr = entries;
|
||||||
|
|
|
@ -980,8 +980,7 @@ search_dir (const struct dir_entry *entry)
|
||||||
}
|
}
|
||||||
if (opt_build_cache)
|
if (opt_build_cache)
|
||||||
add_to_cache (entry->path, filename, dlib_ptr->soname,
|
add_to_cache (entry->path, filename, dlib_ptr->soname,
|
||||||
dlib_ptr->flag, dlib_ptr->isa_level, 0,
|
dlib_ptr->flag, dlib_ptr->isa_level, entry->hwcaps);
|
||||||
entry->hwcaps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free all resources. */
|
/* Free all resources. */
|
||||||
|
|
|
@ -70,7 +70,7 @@ const char *glibc_hwcaps_subdirectory_name
|
||||||
|
|
||||||
extern void add_to_cache (const char *path, const char *filename,
|
extern void add_to_cache (const char *path, const char *filename,
|
||||||
const char *soname, int flags,
|
const char *soname, int flags,
|
||||||
unsigned int isa_level, uint64_t hwcap,
|
unsigned int isa_level,
|
||||||
struct glibc_hwcaps_subdirectory *);
|
struct glibc_hwcaps_subdirectory *);
|
||||||
|
|
||||||
extern void init_aux_cache (void);
|
extern void init_aux_cache (void);
|
||||||
|
|
Loading…
Add table
Reference in a new issue