Re: [RFC-PATCH] x86: really use __builtin_memcmp on x86_32

From: Andi Kleen
Date: Mon Nov 10 2008 - 03:21:38 EST


Harvey Harrison <harvey.harrison@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/