Skip to content

Commit

Permalink
Darwin, Arm64 : Darwin should use an OS call to clear caches.
Browse files Browse the repository at this point in the history
The sys_icache_invalidate() function is the right one to use.

The fixes issue gcc-mirror#17

(cherry picked from commit d425e8b9b0ac44415053104bf2db1edc018866bc)
  • Loading branch information
iains authored and catap committed May 4, 2023
1 parent b3028bf commit 1e1b692
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions gcc/config/aarch64/darwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,8 @@ along with GCC; see the file COPYING3. If not see

#undef ASM_OUTPUT_DEF_FROM_DECLS

#undef CLEAR_INSN_CACHE
#define CLEAR_INSN_CACHE(beg, end) \
extern void sys_icache_invalidate(void *start, size_t len); \
sys_icache_invalidate ((beg), (size_t)((end)-(beg)))

1 change: 0 additions & 1 deletion libgcc/config.host
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ aarch64*-*-elf | aarch64*-*-rtems*)
;;
aarch64*-*darwin* | arm64*-*darwin* )
extra_parts="$extra_parts crtfastmath.o"
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
tmake_file="${tmake_file} ${cpu_type}/t-lse "
tmake_file="${tmake_file} t-crtfm"
# No soft float for now because our long double is DF not TF.
Expand Down

0 comments on commit 1e1b692

Please sign in to comment.