[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] bitops: unify bitops_ffsl with the one in host-
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] bitops: unify bitops_ffsl with the one in host-utils.h |
Date: |
Wed, 30 Jan 2013 12:46:51 -0500 (EST) |
----- Messaggio originale -----
> Da: "Stefan Weil" <address@hidden>
> A: "Paolo Bonzini" <address@hidden>
> Cc: address@hidden, address@hidden, "peter maydell" <address@hidden>
> Inviato: Mercoledì, 30 gennaio 2013 18:36:52
> Oggetto: Re: [Qemu-devel] [PATCH] bitops: unify bitops_ffsl with the one in
> host-utils.h
>
> Am 30.01.2013 17:53, schrieb Paolo Bonzini:
> > Fixes the build on Mac OS X, which has ffsl.
> >
> > Signed-off-by: Paolo Bonzini <address@hidden>
> > ---
> > include/qemu/bitops.h | 40
> > ++++++++++++++--------------------------
> > include/qemu/hbitmap.h | 2 +-
> > include/qemu/host-utils.h | 25 -------------------------
> > util/hbitmap.c | 2 +-
> > 4 files changed, 16 insertions(+), 53 deletions(-)
> >
>
> This patch also fixes MinGW / MinGW-w64 builds which
> don't have a prototype declaration for ffsl.
>
> Tested-by: Stefan Weil <address@hidden>
>
> Nevertheless I wonder why you don't use gcc's __builtin_ffsl.
Because I had no idea it existed until now. :)
Do you know what version of GCC introduced it?
Paolo
> Wouldn't it be easier to call ffsl and rely on the compiler to
> provide inline code? Then adding the missing declaration to
> include/sysemu/os-win32.h would be sufficient (for MinGW).
>
> Stefan
>
>