Skip to contentSkip to conversation

fix ARCH_HAS_PREFETCH

PATCH Andi Kleen 1 participant 1 message Aug 11, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 2 lines · Andrew Morton

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