authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-24 11:51:13-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-24 11:51:13-04:00
log39589cffe0bfcfda8d4802cc14fc335f532a7a90
treef28cc572e606bc8fb126d930880e91df1e3b3494
parent03013e517689575e6050c5c950f6d19847302b85
signaturelock-open Commit is signed but in an unrecognized format.

compiler-rt: fix __clear_cache on aarch64 darwin


1 files changed, 5 insertions(+), 3 deletions(-)

lib/std/special/compiler_rt/clear_cache.zig+5-3
...@@ -146,10 +146,12 @@ pub fn clear_cache(start: usize, end: usize) callconv(.C) void {...@@ -146,10 +146,12 @@ pub fn clear_cache(start: usize, end: usize) callconv(.C) void {
146 //for (uintptr_t dword = start_dword; dword < end_dword; dword += dword_size)146 //for (uintptr_t dword = start_dword; dword < end_dword; dword += dword_size)
147 // __asm__ volatile("flush %0" : : "r"(dword));147 // __asm__ volatile("flush %0" : : "r"(dword));
148 } else if (apple) {148 } else if (apple) {
149 @compileError("TODO");149 // On Darwin, sys_icache_invalidate() provides this functionality
150 //// On Darwin, sys_icache_invalidate() provides this functionality150 sys_icache_invalidate(start, end - start);
151 //sys_icache_invalidate(start, end - start);
152 } else {151 } else {
153 @compileError("no __clear_cache implementation available for this target");152 @compileError("no __clear_cache implementation available for this target");
154 }153 }
155}154}
155
156// Darwin-only
157extern fn sys_icache_invalidate(start: usize, len: usize) void;