[compiler-rt] Fix build errors when using gcc on LoongArch
authorYouling Tang <tangyouling@loongson.cn>
Mon, 26 Dec 2022 01:33:54 +0000 (09:33 +0800)
committerWeining Lu <luweining@loongson.cn>
Mon, 26 Dec 2022 01:33:54 +0000 (09:33 +0800)
commit2b15c63fb73011610ae83c05d0260e2dccf299fc
tree869791ae4209ffdd1683c4ebf52ea6c6002398b1
parent2f6aef52f20c9739e44d80c67a459b552600ae67
[compiler-rt] Fix build errors when using gcc on LoongArch

- GCC does not recognize $fcsr0, uses $r0 instead.
- GCC does not implement __builtin_thread_pointer, which can be
  obtained directly through $tp.

Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D140545
compiler-rt/lib/builtins/loongarch/fp_mode.c
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp