There are two failures in the current builtins,
Failed Tests (2):
Builtins-loongarch64-linux :: clear_cache_test.c
Builtins-loongarch64-linux :: enable_execute_stack_test.c
It is caused by __clear_cache not being implemented and triggering `abort`.
"__clear_cache" is implemented in the same way as "clear_cache" in gcc (
in gcc/config/loongarch/loongarch.md)
Differential Revision: https://reviews.llvm.org/D136921
#else
compilerrt_abort();
#endif
+#elif defined(__linux__) && defined(__loongarch__)
+ __asm__ volatile("ibar 0");
#elif defined(__linux__) && defined(__mips__)
const uintptr_t start_int = (uintptr_t)start;
const uintptr_t end_int = (uintptr_t)end;