From: Simon Marchi <simark@simark.ca>
To: Simon Marchi <simon.marchi@efficios.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/5] gnulib: import count-one-bits module and use it
Date: Fri, 14 Feb 2020 19:53:00 -0000 [thread overview]
Message-ID: <1c71dabc-727d-0958-0358-47997e939852@simark.ca> (raw)
In-Reply-To: <20200213203035.30157-1-simon.marchi@efficios.com>
On 2020-02-13 3:30 p.m., Simon Marchi wrote:
> In a following patch, I 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 it and provides
> a fallback for other compilers, so we might as well use that.
>
> I also noticed that there is a bitcount function in arch/arm.c, so as a
> first step, this patch replaces the uses of that function with gnulib's
> function.
>
> The gnulib module actually 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.
Sorry, I had forgotten that I had sent this patch separately from this series:
https://sourceware.org/ml/gdb-patches/2020-02/msg00410.html
And it is now merged, so you can ignore patch 1/5.
Simon
prev parent reply other threads:[~2020-02-14 19:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 20:30 Simon Marchi
2020-02-13 20:30 ` [PATCH 2/5] gdb: fix printing of flag enums with multi-bit enumerators Simon Marchi
2020-02-17 10:56 ` Luis Machado
2020-02-17 17:27 ` Simon Marchi
[not found] ` <e1fc219b-3abf-29f0-b159-c2970fabbb17@linaro.org>
2020-02-17 19:20 ` Simon Marchi
2020-02-18 20:42 ` Tom Tromey
2020-02-13 20:30 ` [PATCH 5/5] gdb: change print format of flag enums with value 0 Simon Marchi
2020-02-17 12:08 ` Luis Machado
2020-02-17 19:02 ` Simon Marchi
2020-02-18 20:45 ` Tom Tromey
2020-02-18 20:52 ` Simon Marchi
2020-02-13 20:30 ` [PATCH 3/5] gdb: allow duplicate enumerators in flag enums Simon Marchi
2020-02-17 11:01 ` Luis Machado
2020-02-18 20:38 ` Tom Tromey
2020-02-18 20:42 ` Tom Tromey
2020-02-18 20:48 ` Simon Marchi
2020-02-18 21:57 ` Tom Tromey
2020-02-18 22:25 ` Simon Marchi
2020-02-13 20:38 ` [PATCH 4/5] gdb: print unknown part of flag enum in hex Simon Marchi
2020-02-17 11:04 ` Luis Machado
2020-02-17 18:59 ` Simon Marchi
2020-02-18 20:43 ` Tom Tromey
2020-02-14 19:53 ` Simon Marchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c71dabc-727d-0958-0358-47997e939852@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox