[compiler-rt] 8cf83e9 - [VE][compiler-rt] Correct location of VE support in clear_cache function, NFC
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 14 12:50:50 PDT 2022
Author: Brad Smith
Date: 2022-04-14T15:50:26-04:00
New Revision: 8cf83e96591b2ab3e748c0dc5ff019397e00f1ab
URL: https://github.com/llvm/llvm-project/commit/8cf83e96591b2ab3e748c0dc5ff019397e00f1ab
DIFF: https://github.com/llvm/llvm-project/commit/8cf83e96591b2ab3e748c0dc5ff019397e00f1ab.diff
LOG: [VE][compiler-rt] Correct location of VE support in clear_cache function, NFC
Looks like when the VE support was added it was added a few lines below where it should have been.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D123439
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 1f1efbff3ab2a..9816940b504a7 100644
--- a/compiler-rt/lib/builtins/clear_cache.c
+++ b/compiler-rt/lib/builtins/clear_cache.c
@@ -176,12 +176,12 @@ void __clear_cache(void *start, void *end) {
arg.len = (uintptr_t)end - (uintptr_t)start;
sysarch(RISCV_SYNC_ICACHE, &arg);
+#elif defined(__ve__)
+ __asm__ volatile("fencec 2");
#else
#if __APPLE__
// On Darwin, sys_icache_invalidate() provides this functionality
sys_icache_invalidate(start, end - start);
-#elif defined(__ve__)
- __asm__ volatile("fencec 2");
#else
compilerrt_abort();
#endif
More information about the llvm-commits
mailing list