Skip to content

Commit ae16431

Browse files
iainscatap
authored andcommitted
Darwin, Arm64 : Darwin should use an OS call to clear caches.
The sys_icache_invalidate() function is the right one to use. The fixes issue gcc-mirror#17 (cherry picked from commit d425e8b9b0ac44415053104bf2db1edc018866bc)
1 parent 63c2446 commit ae16431

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

gcc/config/aarch64/darwin.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,8 @@ along with GCC; see the file COPYING3. If not see
229229

230230
#undef ASM_OUTPUT_DEF_FROM_DECLS
231231

232+
#undef CLEAR_INSN_CACHE
233+
#define CLEAR_INSN_CACHE(beg, end) \
234+
extern void sys_icache_invalidate(void *start, size_t len); \
235+
sys_icache_invalidate ((beg), (size_t)((end)-(beg)))
236+

libgcc/config.host

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ aarch64*-*-elf | aarch64*-*-rtems*)
413413
;;
414414
aarch64*-*darwin* | arm64*-*darwin* )
415415
extra_parts="$extra_parts crtfastmath.o"
416-
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
417416
tmake_file="${tmake_file} ${cpu_type}/t-lse "
418417
tmake_file="${tmake_file} t-crtfm"
419418
# No soft float for now because our long double is DF not TF.

0 commit comments

Comments
 (0)