[builtins][LoongArch] Port __clear_cache to LoongArch Linux
authorYouling Tang <tangyouling@loongson.cn>
Tue, 1 Nov 2022 12:14:06 +0000 (20:14 +0800)
committerWeining Lu <luweining@loongson.cn>
Tue, 1 Nov 2022 12:15:09 +0000 (20:15 +0800)
commit5b27578fc52bdf06e2d81a271705a39266b047fe
treecca660d9aad12935d598d3b10be3c458f8a5d483
parent6e6704b0dc2c8955c6aa3c69535c247ed154eac3
[builtins][LoongArch] Port __clear_cache to LoongArch Linux

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
compiler-rt/lib/builtins/clear_cache.c