On Wed, Jun 12, 2024 at 2:11 PM Alexander Monakov <amona...@ispras.ru> wrote: > > > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > Ahah, nice. :) I'm pretty sure that, when I tested "pf = > > (__builtin_popcount(x) & 1) * 4;", it was generating a call to > > __builtin_popcountsi2. > > Why write '__builtin_popcount(x) & 1' when you can write > '__builtin_parity(x)' in the first place?
I don't remember. :) Anhow, probably I will add __builtin_parity() to include/qemu/host-utils.h and some kind of #ifdef HAVE_FAST_CTPOP. Thanks. > > Still - for something that has a code generator, there _is_ a cost in > > supporting old CPUs, so I'd rather avoid reverting this. The glibc bug > > that you linked is very different not just because it affected 32-bit > > installation media, but also because it was a bug rather than > > intentional. > > > > Since you are reporting this issue, how did you find out / what broke for > > you? > > I found out from the mailing list. My Core2-based desktop would be affected. Do you run QEMU on it? With KVM or TCG? Paolo