2 * UCW Library -- Prefetch
4 * (c) 1997--2006 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
10 #ifndef _UCW_PREFETCH_H
11 #define _UCW_PREFETCH_H
14 /* K6 doesn't have prefetches */
16 #elif defined(__athlon) || defined(__k8) || \
18 defined(__pentium4) || defined(__prescott) || defined(__nocona)
21 static inline void prefetch(void *addr)
23 asm volatile ("prefetcht0 %0" : : "m" (*(byte*)addr));
27 #warning "Don't know how to prefetch on your CPU. Please fix ucw/prefetch.h."
31 static inline void prefetch(void *addr UNUSED)