Skip to content

Commit 2c20ec6

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) Signed-off-by: Kirill A. Korinsky <[email protected]>
1 parent 212042c commit 2c20ec6

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
@@ -421,7 +421,6 @@ aarch64*-*-elf | aarch64*-*-rtems*)
421421
;;
422422
aarch64*-*darwin* | arm64*-*darwin* )
423423
extra_parts="$extra_parts crtfastmath.o"
424-
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
425424
tmake_file="${tmake_file} ${cpu_type}/t-lse "
426425
tmake_file="${tmake_file} t-crtfm"
427426
# No soft float for now because our long double is DF not TF.

0 commit comments

Comments
 (0)