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)
14 /* Default prefetches are good enough */
17 /* K6 doesn't have prefetches */
19 #elif defined(__athlon) || defined(__i686)
22 static inline void prefetch(void *addr)
24 asm volatile ("prefetcht0 %0" : : "m" (*(byte*)addr));
28 #warning "Don't know how to prefetch on your CPU. Please fix lib/prefetch.h."
32 static inline void prefetch(void *addr UNUSED)