We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3446db commit e74f2b9Copy full SHA for e74f2b9
runtime/src/cache_control.rs
@@ -25,10 +25,22 @@ pub fn prepare_for_execution(slice: &[u8]) {
25
#[inline(always)]
26
#[allow(unused_variables)]
27
pub fn synchronize_icache(slice: &[u8]) {
28
- #[cfg(target_arch="aarch64")]
+ #[cfg(all(target_arch="aarch64", not(target_os="macos")))]
29
{
30
aarch64::synchronize_icache(slice);
31
}
32
+ #[cfg(all(target_arch="aarch64", target_os="macos"))]
33
+ {
34
+ extern "C" {
35
+ pub fn sys_icache_invalidate(
36
+ start: *const std::ffi::c_void,
37
+ size: usize,
38
+ );
39
+ }
40
+ unsafe {
41
+ sys_icache_invalidate(slice.as_ptr() as *const std::ffi::c_void, slice.len());
42
43
44
45
46
#[cfg(target_arch="aarch64")]
0 commit comments