binutils-gdb/gnulib/import
Simon Marchi 5f661e0397 gnulib: import count-one-bits module and use it
For a fix I intend to submit, I would need a function that counts the
number of set bits in a word.  There is  __builtin_popcount that is
supported by gcc and clang, but there is also a gnulib module that wraps
that and provides a fallback for other compilers, so I think it would be
good to use it.

I also noticed that there is a bitcount function in arch/arm.c, so I
thought that as a first step I would replace that one with the gnulib
count-one-bits module.  This is what this patch does.

The gnulib module provides multiple functions, with various parameter
length (unsigned int, unsigned long int, unsigned long long int), I
chose the one that made sense for each call site based on the argument
type.

gnulib/ChangeLog:

	* update-gnulib.sh (IMPORTED_GNULIB_MODULES): Import
	count-one-bits module.
	* configure: Re-generate.
	* aclocal.m4: Re-generate.
	* Makefile.in: Re-generate.
	* import/count-one-bits.c: New file.
	* import/count-one-bits.h: New file.
	* import/Makefile.am: Re-generate.
	* import/Makefile.in: Re-generate.
	* import/m4/gnulib-cache.m4: Re-generate.
	* import/m4/gnulib-comp.m4: Re-generate.
	* import/m4/count-one-bits.m4: New file.

gdb/ChangeLog:

	* arm-tdep.c: Include count-one-bits.h.
	(cleanup_block_store_pc): Use count_one_bits.
	(cleanup_block_load_pc): Use count_one_bits.
	(arm_copy_block_xfer): Use count_one_bits.
	(thumb2_copy_block_xfer): Use count_one_bits.
	(thumb_copy_pop_pc_16bit): Use count_one_bits.
	* arch/arm-get-next-pcs.c: Include count-one-bits.h.
	(thumb_get_next_pcs_raw): Use count_one_bits.
	(arm_get_next_pcs_raw): Use count_one_bits_l.
	* arch/arm.c (bitcount): Remove.
	* arch/arm.h (bitcount): Remove.
2020-02-14 14:41:07 -05:00
..
extra Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
glthread Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
m4 gnulib: import count-one-bits module and use it 2020-02-14 14:41:07 -05:00
malloc Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
Makefile.am gnulib: import count-one-bits module and use it 2020-02-14 14:41:07 -05:00
Makefile.in gnulib: import count-one-bits module and use it 2020-02-14 14:41:07 -05:00
_Noreturn.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
alloca.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
alloca.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
arg-nonnull.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
arpa_inet.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
assure.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
at-func.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
basename-lgpl.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
c++defs.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
canonicalize-lgpl.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
cdefs.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
chdir-long.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
chdir-long.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
cloexec.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
cloexec.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
close.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
closedir.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
count-one-bits.c gnulib: import count-one-bits module and use it 2020-02-14 14:41:07 -05:00
count-one-bits.h gnulib: import count-one-bits module and use it 2020-02-14 14:41:07 -05:00
dirent-private.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dirent.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dirfd.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dirname-lgpl.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dirname.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dosname.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dup-safer-flag.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dup-safer.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dup.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
dup2.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
errno.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
error.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
error.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
exitfail.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
exitfail.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fchdir.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fcntl.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fcntl.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fd-hook.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fd-hook.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fd-safer-flag.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fd-safer.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fdopendir.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
filename.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
filenamecat-lgpl.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
filenamecat.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
flexmember.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
float+.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
float.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
float.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fnmatch.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fnmatch.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fnmatch_loop.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fpucw.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
frexp.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
frexpl.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fstat.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
fstatat.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
getcwd-lgpl.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
getcwd.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
getdtablesize.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
getlogin_r.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
getprogname.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
getprogname.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
gettext.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
gettimeofday.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
glob-libc.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
glob.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
glob.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
glob_internal.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
glob_pattern_p.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
globfree.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
hard-locale.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
hard-locale.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
inet_ntop.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
intprops.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
inttypes.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
isnan.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
isnand-nolibm.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
isnand.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
isnanl-nolibm.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
isnanl.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
itold.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
libc-config.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
limits.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
localcharset.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
localcharset.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
localtime-buffer.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
localtime-buffer.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
lstat.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
malloc.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
malloca.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
malloca.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
math.c Move gnulib to top level 2019-06-14 12:40:02 -06:00
math.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mbrtowc.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mbsinit.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mbsrtowcs-impl.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mbsrtowcs-state.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mbsrtowcs.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
memchr.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
memchr.valgrind Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
memmem.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mempcpy.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
memrchr.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mkdir.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mkdtemp.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
mkostemp.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
msvc-inval.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
msvc-inval.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
msvc-nothrow.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
msvc-nothrow.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
netinet_in.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
open.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
openat-die.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
openat-priv.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
openat-proc.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
openat.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
openat.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
opendir.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
pathmax.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
pipe-safer.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
rawmemchr.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
rawmemchr.valgrind Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
readdir.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
readlink.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
realloc.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
rename.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
rewinddir.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
rmdir.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
same-inode.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
save-cwd.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
save-cwd.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
scratch_buffer.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
setenv.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
signal.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stat-time.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stat-time.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stat-w32.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stat-w32.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stat.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stdalign.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stdbool.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stddef.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stdint.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stdio.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stdlib.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
str-two-way.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strchrnul.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strchrnul.valgrind Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strdup.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
streq.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strerror-override.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strerror-override.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strerror.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strerror_r.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
string.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
stripslash.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strnlen1.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strnlen1.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strstr.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
strtok_r.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
sys_socket.c Move gnulib to top level 2019-06-14 12:40:02 -06:00
sys_socket.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
sys_stat.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
sys_time.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
sys_types.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
sys_uio.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
tempname.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
tempname.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
time.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
time_r.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
unistd--.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
unistd-safer.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
unistd.c Move gnulib to top level 2019-06-14 12:40:02 -06:00
unistd.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
unsetenv.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
verify.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
warn-on-use.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
wchar.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
wctype-h.c Move gnulib to top level 2019-06-14 12:40:02 -06:00
wctype.in.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-initguard.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-mutex.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-mutex.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-once.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-once.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-recmutex.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-recmutex.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-rwlock.c Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
windows-rwlock.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00
xalloc-oversized.h Update Gnulib to the latest git version 2019-12-16 12:20:50 -06:00