aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/special/compiler_rt/clear_cache.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/std/special/compiler_rt/clear_cache.zig b/lib/std/special/compiler_rt/clear_cache.zig
index 740de34749..77470251d1 100644
--- a/lib/std/special/compiler_rt/clear_cache.zig
+++ b/lib/std/special/compiler_rt/clear_cache.zig
@@ -146,10 +146,12 @@ pub fn clear_cache(start: usize, end: usize) callconv(.C) void {
//for (uintptr_t dword = start_dword; dword < end_dword; dword += dword_size)
// __asm__ volatile("flush %0" : : "r"(dword));
} else if (apple) {
- @compileError("TODO");
- //// On Darwin, sys_icache_invalidate() provides this functionality
- //sys_icache_invalidate(start, end - start);
+ // On Darwin, sys_icache_invalidate() provides this functionality
+ sys_icache_invalidate(start, end - start);
} else {
@compileError("no __clear_cache implementation available for this target");
}
}
+
+// Darwin-only
+extern fn sys_icache_invalidate(start: usize, len: usize) void;