Re: [PATCH v2] Add bit operations util header

Поиск
Список
Период
Сортировка
От Jeremy Kerr
Тема Re: [PATCH v2] Add bit operations util header
Дата
Msg-id 200906032127.16906.jk@ozlabs.org
обсуждение исходный текст
Ответ на Re: [PATCH v2] Add bit operations util header  (Florian Weimer <fweimer@bfk.de>)
Ответы Re: [PATCH v2] Add bit operations util header  (Florian Weimer <fweimer@bfk.de>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Markus Wanner"
Дата:
Сообщение: Re: PostgreSQL Developer meeting minutes up
Следующее
От: Florian Weimer
Дата:
Сообщение: Re: [PATCH v2] Add bit operations util header