[libc-commits] [libc] [libc][math] Fix arm-linux-gnueabihf target when building with gcc/g++. (PR #202090)
Simon Tatham via libc-commits
libc-commits at lists.llvm.org
Tue Jun 9 01:18:30 PDT 2026
================
@@ -26,15 +26,15 @@ namespace fputil {
#ifdef LIBC_TARGET_CPU_HAS_FPU_FLOAT
template <> LIBC_INLINE float sqrt<float>(float x) {
float y;
- asm("vsqrt %0, %1\n\t" : "=w"(y) : "w"(x));
+ asm("vsqrt.f32 %0, %1\n\t" : "=w"(y) : "w"(x));
return y;
}
#endif // LIBC_TARGET_CPU_HAS_FPU_FLOAT
#ifdef LIBC_TARGET_CPU_HAS_FPU_DOUBLE
template <> LIBC_INLINE double sqrt<double>(double x) {
double y;
- asm("vsqrt %0, %1\n\t" : "=w"(y) : "w"(x));
+ asm("vsqrt.f64 %P0, %P1\n\t" : "=w"(y) : "w"(x));
----------------
statham-arm wrote:
Ah, so there's a possibility it does something in a particular version of gcc even though it does nothing at all in LLVM? Fair enough.
https://github.com/llvm/llvm-project/pull/202090
More information about the libc-commits
mailing list