[VE][compiler-rt] Support VE in clear_cache.c

Support SX Aurora VE by __clear_cache() function.  This modification
allows VE to run written data, e.g. clear_cache_test.c under compiler-rt
test.  We still have code alignment problem in enable_execute_stack_test.c,
though.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D92703
This commit is contained in:
Kazushi (Jam) Marukawa 2020-12-05 08:13:04 +09:00
parent a2f4f7daf7
commit 414d3dc62c

View File

@ -167,6 +167,8 @@ void __clear_cache(void *start, void *end) {
#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