diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-09-04 14:05:12 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2021-08-29 07:50:52 +0100 |
commit | fc3e9f58ec18154027aadc6aa055490acb8c2920 (patch) | |
tree | 51b40df3024454b3e4e57580151c0ed1202035aa | |
parent | a21e5de4214705632fed99993dcabe1c12e9c548 (diff) | |
download | gcc-fc3e9f58ec18154027aadc6aa055490acb8c2920.zip gcc-fc3e9f58ec18154027aadc6aa055490acb8c2920.tar.gz gcc-fc3e9f58ec18154027aadc6aa055490acb8c2920.tar.bz2 |
Darwin, X86 : Implement __cache_clear.
We had a NOP cache clear, but there is a suitable mechanism provided
by a system call. This connects it up.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/ChangeLog:
* config/i386/darwin.h (CLEAR_INSN_CACHE): New.
-rw-r--r-- | gcc/config/i386/darwin.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index 73b06e2..da0ae5b 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -344,3 +344,8 @@ along with GCC; see the file COPYING3. If not see #undef SUBTARGET_SHADOW_OFFSET #define SUBTARGET_SHADOW_OFFSET \ (TARGET_LP64 ? HOST_WIDE_INT_1 << 44 : HOST_WIDE_INT_1 << 29) + +#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))) |