iflib: Use empty inline functions for prefetch*() on non-x86.

This avoids warnings about unused variables in expressions passed to
prefetch*().
This commit is contained in:
John Baldwin 2022-04-08 17:25:14 -07:00
parent 48c21c2155
commit d08cb45362

View File

@ -1399,6 +1399,7 @@ prefetch(void *x)
{
__asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x));
}
static __inline void
prefetch2cachelines(void *x)
{
@ -1408,8 +1409,15 @@ prefetch2cachelines(void *x)
#endif
}
#else
#define prefetch(x)
#define prefetch2cachelines(x)
static __inline void
prefetch(void *x)
{
}
static __inline void
prefetch2cachelines(void *x)
{
}
#endif
static void