diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2019-09-28 13:19:20 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2019-09-28 13:19:20 +0000 |
commit | 16a010803d3007247de71e990e96da63cf92e94c (patch) | |
tree | 0d8fc129a0cdf1fc2f83f34c47fe9a8edb69237f | |
parent | f86e6fe0dfa60a4005a38ce669e67bba29779bf0 (diff) |
Make compiler-rt's __clear_cache() work on 32-bit ARM by making
it use sysarch().
From Josh Elsasser
ok kettenis@
-rw-r--r-- | lib/libcompiler_rt/clear_cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcompiler_rt/clear_cache.c b/lib/libcompiler_rt/clear_cache.c index 9dcab344ad1..e6bd170df38 100644 --- a/lib/libcompiler_rt/clear_cache.c +++ b/lib/libcompiler_rt/clear_cache.c @@ -33,7 +33,7 @@ uintptr_t GetCurrentProcess(void); #include <machine/sysarch.h> #endif -#if defined(__OpenBSD__) && defined(__mips__) +#if defined(__OpenBSD__) && (defined(__arm__) || defined(__mips__)) #include <sys/types.h> #include <machine/sysarch.h> #endif @@ -104,7 +104,7 @@ void __clear_cache(void *start, void *end) { #elif defined(_WIN32) && (defined(__arm__) || defined(__aarch64__)) FlushInstructionCache(GetCurrentProcess(), start, end - start); #elif defined(__arm__) && !defined(__APPLE__) - #if defined(__FreeBSD__) || defined(__NetBSD__) + #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) struct arm_sync_icache_args arg; arg.addr = (uintptr_t)start; |