[llvm-branch-commits] [compiler-rt] bdf9215 - MIPS: clear_cache, use _flush_cache instead of cacheflush
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 8 00:29:46 PDT 2023
Author: YunQiang Su
Date: 2023-08-08T09:24:10+02:00
New Revision: bdf92159c8297e8fda0a55b2651c630e3f1ac613
URL: https://github.com/llvm/llvm-project/commit/bdf92159c8297e8fda0a55b2651c630e3f1ac613
DIFF: https://github.com/llvm/llvm-project/commit/bdf92159c8297e8fda0a55b2651c630e3f1ac613.diff
LOG: MIPS: clear_cache, use _flush_cache instead of cacheflush
The cacheflush is only defined with __USE_MISC, which depends on _DEFAULT_SOURCE,
_GNU_SOURCE or _BSD_SOURCE, or _SVID_SOURCE.
If CC is called with -std=c11, these macros won't be defined, Let's use
_flush_cache, which is defined always.
Reviewed By: brad, jrtc27
Differential Revision: https://reviews.llvm.org/D156072
(cherry picked from commit 0f99bc2d685c572c3b38fd0e1ca56be12d7e2f6a)
Added:
Modified:
compiler-rt/lib/builtins/clear_cache.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/clear_cache.c b/compiler-rt/lib/builtins/clear_cache.c
index 54cbda059315a7..2ac99b25c243f0 100644
--- a/compiler-rt/lib/builtins/clear_cache.c
+++ b/compiler-rt/lib/builtins/clear_cache.c
@@ -113,7 +113,7 @@ void __clear_cache(void *start, void *end) {
#elif defined(__linux__) || defined(__OpenBSD__)
// Pre-R6 may not be globalized. And some implementations may give strange
// synci_step. So, let's use libc call for it.
- cacheflush(start, end_int - start_int, BCACHE);
+ _flush_cache(start, end_int - start_int, BCACHE);
#else
(void)start_int;
(void)end_int;
More information about the llvm-branch-commits
mailing list