mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
libm/arm: Remove the compiler specific #warning
let ld report the error instead Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
ba94a24c8b
commit
bf391eaec2
@@ -30,14 +30,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if (__ARM_ARCH >= 7) && (__ARM_FP >= 4)
|
#if (__ARM_ARCH >= 7) && (__ARM_FP >= 4)
|
||||||
|
|
||||||
float fabsf(float x)
|
float fabsf(float x)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
asm volatile ("vabs.f32\t%0, %1" : "=t" (result) : "t" (x));
|
asm volatile ("vabs.f32\t%0, %1" : "=t" (result) : "t" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning fabsf() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -30,14 +30,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if (__ARM_ARCH >= 7) && (__ARM_FP >= 4)
|
#if (__ARM_ARCH >= 7) && (__ARM_FP >= 4)
|
||||||
|
|
||||||
float sqrtf(float x)
|
float sqrtf(float x)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
asm volatile ("vsqrt.f32\t%0, %1" : "=t" (result) : "t" (x));
|
asm volatile ("vsqrt.f32\t%0, %1" : "=t" (result) : "t" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning sqrtf() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
||||||
|
|
||||||
double ceil(double x)
|
double ceil(double x)
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
asm volatile("vrintp.f64\t%P0, %P1" : "=w"(result) : "w"(x));
|
asm volatile("vrintp.f64\t%P0, %P1" : "=w"(result) : "w"(x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning ceil() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
||||||
|
|
||||||
float ceilf(float x)
|
float ceilf(float x)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
asm volatile("vrintp.f32\t%0, %1" : "=t"(result) : "t"(x));
|
asm volatile("vrintp.f32\t%0, %1" : "=t"(result) : "t"(x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning ceilf() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
||||||
|
|
||||||
double floor(double x)
|
double floor(double x)
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
asm volatile ("vrintm.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
asm volatile ("vrintm.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning floor() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
||||||
|
|
||||||
float floorf(float x)
|
float floorf(float x)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
asm volatile("vrintm.f32\t%0, %1" : "=t"(result) : "t"(x));
|
asm volatile("vrintm.f32\t%0, %1" : "=t"(result) : "t"(x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning floorf() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
||||||
|
|
||||||
double nearbyint(double x)
|
double nearbyint(double x)
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
asm volatile ("vrintr.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
asm volatile ("vrintr.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning nearbyint() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
||||||
|
|
||||||
float nearbyintf(float x)
|
float nearbyintf(float x)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
asm volatile ("vrintr.f32\t%0, %1" : "=t" (result) : "t" (x));
|
asm volatile ("vrintr.f32\t%0, %1" : "=t" (result) : "t" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning nearbyintf() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
||||||
|
|
||||||
double rint(double x)
|
double rint(double x)
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
asm volatile ("vrintx.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
asm volatile ("vrintx.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning rint() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
||||||
|
|
||||||
float rintf(float x)
|
float rintf(float x)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
asm volatile ("vrintx.f32\t%0, %1" : "=t" (result) : "t" (x));
|
asm volatile ("vrintx.f32\t%0, %1" : "=t" (result) : "t" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning rintf() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
||||||
|
|
||||||
double round(double x)
|
double round(double x)
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
asm volatile ("vrinta.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
asm volatile ("vrinta.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning round() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
||||||
|
|
||||||
float roundf(float x)
|
float roundf(float x)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
asm volatile ("vrinta.f32\t%0, %1" : "=t" (result) : "t" (x));
|
asm volatile ("vrinta.f32\t%0, %1" : "=t" (result) : "t" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning roundf() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
|
||||||
|
|
||||||
double trunc(double x)
|
double trunc(double x)
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
asm volatile ("vrintz.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
asm volatile ("vrintz.f64\t%P0, %P1" : "=w" (result) : "w" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning trunc() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,14 +40,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
|
||||||
|
|
||||||
float truncf(float x)
|
float truncf(float x)
|
||||||
{
|
{
|
||||||
float result;
|
float result;
|
||||||
asm volatile ("vrintz.f32\t%0, %1" : "=t" (result) : "t" (x));
|
asm volatile ("vrintz.f32\t%0, %1" : "=t" (result) : "t" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
# warning truncf() not built
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user