Fix build issue with const and volatile and the

myriad ways that the various compliers treat this. The
only safe prefetch appears to be for AMD. The other
compilers either are not volatile or are not const :(

Reported by:	Michael Tuexen
This commit is contained in:
Randall Stewart 2018-06-07 19:57:55 +00:00
parent 7ccdc06829
commit 12693c6c83

View File

@ -34,7 +34,7 @@ kern_prefetch(const volatile void *addr, void* before)
#if defined(__amd64__)
__asm __volatile("prefetcht1 (%1)":"=rm"(*((int32_t *)before)):"r"(addr):);
#else
__builtin_prefetch(addr);
/* __builtin_prefetch(addr);*/
#endif
}