diff --git a/libc/include/llvm-libc-macros/stdfix-macros.h b/libc/include/llvm-libc-macros/stdfix-macros.h index 04097e14e9747..20fa41e509e58 100644 --- a/libc/include/llvm-libc-macros/stdfix-macros.h +++ b/libc/include/llvm-libc-macros/stdfix-macros.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_MACROS_STDFIX_MACROS_H #define LLVM_LIBC_MACROS_STDFIX_MACROS_H -#ifdef __FRACT_FBIT__ +#if defined(__FRACT_FBIT__) && defined(__clang__) // _Fract and _Accum types are available #define LIBC_COMPILER_HAS_FIXED_POINT #endif // __FRACT_FBIT__ diff --git a/libc/src/__support/FPUtil/arm/sqrt.h b/libc/src/__support/FPUtil/arm/sqrt.h index e6cb58c0be817..71803c2ad3156 100644 --- a/libc/src/__support/FPUtil/arm/sqrt.h +++ b/libc/src/__support/FPUtil/arm/sqrt.h @@ -26,7 +26,7 @@ namespace fputil { #ifdef LIBC_TARGET_CPU_HAS_FPU_FLOAT template <> LIBC_INLINE float sqrt(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 @@ -34,7 +34,7 @@ template <> LIBC_INLINE float sqrt(float x) { #ifdef LIBC_TARGET_CPU_HAS_FPU_DOUBLE template <> LIBC_INLINE double sqrt(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)); return y; } #endif // LIBC_TARGET_CPU_HAS_FPU_DOUBLE