Re: [patch 4/21] fix ARCH_HAS_PREFETCH

Andi Kleen (ak@suse.de)
11 Aug 2002 11:53:21 +0200


Andrew Morton <akpm@zip.com.au> writes:

> Which needs a working ARCH_HAS_PREFETCH to avoid probable extra code
> generation on CPUs which don't have prefetch.

When you use gcc 3.1+ you can use __builtin_prefetch() and gcc takes care of
it. See asm-x86_64/prefetch.h of a working example.

Of course generic C code should not use the ugly builtins directly, but
it could be used to define the wrappers.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/