lightrec: Move lightrec_code_inv() out of glue code
[pcsx_rearmed.git] / libpcsxcore / lightrec / mem_wiiu.c
index f62b8b3..7cba547 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "mem.h"
 
+void wiiu_clear_cache(void *start, void *end);
+
 static void* wiiu_mmap(uint32_t requested_va, size_t length, void* backing_mem) {
        if (length < OS_PAGE_SIZE) length = OS_PAGE_SIZE;
 
@@ -104,3 +106,8 @@ void lightrec_free_mmap(void) {
        free(psx_scratch);
        free(psx_bios);
 }
+
+void lightrec_code_inv(void *ptr, uint32_t len)
+{
+       wiiu_clear_cache(ptr, (void *)((uintptr_t)ptr + len));
+}