public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC-PATCH] x86: really use __builtin_memcmp on x86_32
Date: Mon, 10 Nov 2008 09:38:58 +0100	[thread overview]
Message-ID: <87prl4otzx.fsf@basil.nowhere.org> (raw)
In-Reply-To: <1226297544.5478.26.camel@brick> (Harvey Harrison's message of "Sun, 09 Nov 2008 22:12:23 -0800")

Harvey Harrison <harvey.harrison@gmail.com> writes:

> Impact: prevent generic code from overriding __builtin_memcmp
>
> lib/string.c was using a generic implementation of memcmp
> because __HAVE_ARCH_MEMCMP was not defined and it was then doing
> #undef memcmp and defining a generic version.

gcc sometimes decides to not inline memcmp, so an out of line
version is always needed even when __builtin_memcmp is used.

While in theory x86 could supply an optimized version,
memcmp is relatively rarely used (and in many cases inlined),
so adding an assembler version for x86 is likely not worth
it.

-Andi

-- 
ak@linux.intel.com

      parent reply	other threads:[~2008-11-10  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10  6:12 [RFC-PATCH] x86: really use __builtin_memcmp on x86_32 Harvey Harrison
2008-11-10  7:45 ` Ingo Molnar
2008-11-10  8:05   ` Ingo Molnar
2008-11-10 16:53     ` Harvey Harrison
2008-11-10  8:38 ` Andi Kleen [this message]

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=87prl4otzx.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=harvey.harrison@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox