2 * UCW Library -- Prefetch
4 * (c) 1997--2005 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
13 #if defined(__pentium4)
16 static inline void prefetch(void *addr)
18 asm volatile ("prefetcht0 %0" : : "m" (*(byte*)addr));
22 /* K6 doesn't have prefetches */
24 #elif defined(__athlon) || defined(__i686)
27 static inline void prefetch(void *addr)
29 asm volatile ("prefetcht0 %0" : : "m" (*(byte*)addr));
33 #warning "Don't know how to prefetch on your CPU. Please fix lib/prefetch.h."
37 static inline void prefetch(void *addr UNUSED)