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:
rrs 2018-06-07 19:57:55 +00:00
parent fbe5d5cbf1
commit 4f878c4dbd

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
}