Re: [PATCH v2] Add bit operations util header

From: Jeremy Kerr <jk(at)ozlabs(dot)org>
To: Florian Weimer <fweimer(at)bfk(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Atsushi Ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp>
Subject: Re: [PATCH v2] Add bit operations util header
Date: 2009-06-03 11:27:16
Message-ID: 200906032127.16906.jk@ozlabs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Florian,

> > +#if defined(__GNUC__) && \
> > + (defined(__ppc__) || defined(__powerpc__) || \
> > + defined(__ppc64__) || defined (__powerpc64__))
>
> If you require GCC anyway, you can use __builtin_clz instead.
> (It's been available since GCC 4.1 at least.)

Because now we have to test the compiler *and* the version as well?

But I do agree that using the builtins makes for much better code; I'm
looking at a future change that does this.

Cheers,

Jeremy

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Weimer 2009-06-03 11:34:53 Re: [PATCH v2] Add bit operations util header
Previous Message Markus Wanner 2009-06-03 11:10:04 Re: PostgreSQL Developer meeting minutes up