From: bdemsky Date: Tue, 19 Oct 2010 05:14:46 +0000 (+0000) Subject: let the prefetch go through a register instead... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=80f495db9f0b7b83c239df80208e572446bf7706;p=IRC.git let the prefetch go through a register instead... --- diff --git a/Robust/src/Runtime/memPool.h b/Robust/src/Runtime/memPool.h index 51fbc1f2..9d2f21b3 100644 --- a/Robust/src/Runtime/memPool.h +++ b/Robust/src/Runtime/memPool.h @@ -120,8 +120,6 @@ static inline void* poolalloc( MemPool* p ) { ////////////////////////////////////////////////////////// // - // a prefetch statement from the Linux kernel, - // which the little "m" depends on architecture: // // static inline void prefetch(void *x) // { @@ -132,7 +130,7 @@ static inline void* poolalloc( MemPool* p ) { // but this built-in gcc one seems the most portable: ////////////////////////////////////////////////////////// //__builtin_prefetch( &(p->head->next) ); - asm volatile( "prefetcht0 %0" :: "m" (next)); + asm volatile( "prefetcht0 (%0)" :: "r" (next)); return headCurrent; }