diff --git a/wiiu/system/missing_libc_functions.c b/wiiu/system/missing_libc_functions.c index 060785d63f..ed66918984 100644 --- a/wiiu/system/missing_libc_functions.c +++ b/wiiu/system/missing_libc_functions.c @@ -142,6 +142,15 @@ long sysconf(int name) { } } +/** + * Intended to replace libgcc's __clear_cache builtin. + * For cores that need it, add -D__clear_cache=wiiu_clear_cache to CFLAGS. + */ +void wiiu_clear_cache (char *beg, char *end) { + DCFlushRange(beg, (uint32_t)(end - beg)); + ICInvalidateRange(beg, (uint32_t)(end - beg)); +} + /** * Implementation of getifaddrs() and freeifaddrs() for WiiU. */