This ppc64 implementation of clear_cache works for both big and little endian.

llvm-svn: 309848
This commit is contained in:
Sterling Augustine
2017-08-02 18:13:59 +00:00
parent 8adb8d5d0d
commit f67036b62c

View File

@@ -165,7 +165,7 @@ void __clear_cache(void *start, void *end) {
for (addr = xstart; addr < xend; addr += icache_line_size)
__asm __volatile("ic ivau, %0" :: "r"(addr));
__asm __volatile("isb sy");
#elif defined (__powerpc64__) && defined(__LITTLE_ENDIAN__)
#elif defined (__powerpc64__)
const size_t line_size = 32;
const size_t len = (uintptr_t)end - (uintptr_t)start;