All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Alexander van Heukelum <heukelum@mailshack.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, heukelum@fastmail.fm
Subject: Re: [PATCH] x86: always_inline wrapper for x86's test_bit
Date: Sun, 13 Apr 2008 18:58:30 +0200	[thread overview]
Message-ID: <87hce5wv2h.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20080413112308.GA23426@mailshack.com> (Alexander van Heukelum's message of "Sun, 13 Apr 2008 13:23:08 +0200")

Alexander van Heukelum <heukelum@mailshack.com> writes:

> On x86, test_bit is currently implemented as a preprocessor macro. It
> uses gcc's __builtin_constant_p to determine if the bit position is 
> known at compile time and defers to one of two functions depending
> on that. This changes the same logic to an __always_inline wrapper
> instead.

Some old gccs didn't support __builtin_constant_p in inline properly,
that is why it was always written in macros.

Please double check with the oldest still supported gcc (3.2) if it 
really generates the expected code for the constant/non constant case.

-Andi

  reply	other threads:[~2008-04-13 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-13 11:23 [PATCH] x86: always_inline wrapper for x86's test_bit Alexander van Heukelum
2008-04-13 16:58 ` Andi Kleen [this message]
2008-04-13 18:03   ` Alexander van Heukelum
2008-04-13 18:16     ` Andi Kleen
2008-04-14 12:24       ` Alexander van Heukelum
2008-04-14 12:28         ` Ingo Molnar
2008-04-14 12:34         ` Andi Kleen
2008-04-14  7:52 ` Ingo Molnar
2008-04-14 13:49   ` Alexander van Heukelum

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=87hce5wv2h.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=heukelum@fastmail.fm \
    --cc=heukelum@mailshack.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.