Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc][AArch64] Fix fullbuild when using G++/GCC
The libc uses some functions that GCC does not currently implement, that come from Arm's ACLE header usually. These are: ``` __arm_wsr64 __arm_rsr64 __arm_wsr __arm_rsr ``` This issue was reported to us (llvm/llvm-project#60473) and I've then reported that back to GCC (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108642). Even if these functions are added, clang has some non standard extensions to them that gcc may not take. So we're looking at a fix in gcc 13 at best, and that may not be enough for what we're doing with them. So I've added ifdefs to use alternatives with gcc. For handling the stack pointer, inline assembly is unfortunately the only option. I have verified that the single mov is essentially what __arm_rsr64 generates. For fpsr and fpcr the gcc devs suggested using https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/AArch64-Built-in-Functions.html#AArch64-Built-in-Functions. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D143261
- Loading branch information