lkml.org 
[lkml]   [2008]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC-PATCH] x86: really use __builtin_memcmp on x86_32

* Harvey Harrison <harvey.harrison@gmail.com> wrote:

> 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.
>
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
> arch/x86/include/asm/string_32.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)

> +#define __HAVE_ARCH_MEMCMP
> #define memcmp __builtin_memcmp
>
> #define __HAVE_ARCH_MEMCHR

on a quick look, since x86 sets __HAVE_ARCH_STRSTR, nothing in
lib/string.c would actually use this generic (and slower) memcmp
implementation, correct? So there should be no impact to object code,
it's a cleanup - right?

Ingo


\
 
 \ /
  Last update: 2008-11-10 08:49    [W:3.101 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site