aboutsummaryrefslogtreecommitdiff
path: root/src/math/x86_64
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-01-04 20:36:02 -0300
committerEuAndreh <eu@euandre.org>2024-01-05 05:47:09 -0300
commit8492f115890d56c98c1da24b9fdf26bb1b714c05 (patch)
tree7d90469d2aff11c2e4c8e99e7b46aa8e8eb43008 /src/math/x86_64
parentFix the build system. (diff)
downloadgrovel-8492f115890d56c98c1da24b9fdf26bb1b714c05.tar.gz
grovel-8492f115890d56c98c1da24b9fdf26bb1b714c05.tar.xz
Setup stub unit test infrastructure
Diffstat (limited to 'src/math/x86_64')
-rw-r--r--src/math/x86_64/fabs.c8
-rw-r--r--src/math/x86_64/fabsf.c8
-rw-r--r--src/math/x86_64/fabsl.c8
-rw-r--r--src/math/x86_64/fma.c8
-rw-r--r--src/math/x86_64/fmaf.c8
-rw-r--r--src/math/x86_64/fmodl.c8
-rw-r--r--src/math/x86_64/llrint.c8
-rw-r--r--src/math/x86_64/llrintf.c8
-rw-r--r--src/math/x86_64/llrintl.c8
-rw-r--r--src/math/x86_64/lrint.c8
-rw-r--r--src/math/x86_64/lrintf.c8
-rw-r--r--src/math/x86_64/lrintl.c8
-rw-r--r--src/math/x86_64/remainderl.c8
-rw-r--r--src/math/x86_64/remquol.c8
-rw-r--r--src/math/x86_64/rintl.c8
-rw-r--r--src/math/x86_64/sqrt.c8
-rw-r--r--src/math/x86_64/sqrtf.c8
-rw-r--r--src/math/x86_64/sqrtl.c8
18 files changed, 144 insertions, 0 deletions
diff --git a/src/math/x86_64/fabs.c b/src/math/x86_64/fabs.c
index 16562477..aca2f361 100644
--- a/src/math/x86_64/fabs.c
+++ b/src/math/x86_64/fabs.c
@@ -8,3 +8,11 @@ double fabs(double x)
__asm__ ("andps %1, %0" : "+x"(x) : "x"(t)); // x &= t
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/fabsf.c b/src/math/x86_64/fabsf.c
index 36ea7481..4b84c6e5 100644
--- a/src/math/x86_64/fabsf.c
+++ b/src/math/x86_64/fabsf.c
@@ -8,3 +8,11 @@ float fabsf(float x)
__asm__ ("andps %1, %0" : "+x"(x) : "x"(t)); // x &= t
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/fabsl.c b/src/math/x86_64/fabsl.c
index cc1c9ed9..95e58e87 100644
--- a/src/math/x86_64/fabsl.c
+++ b/src/math/x86_64/fabsl.c
@@ -5,3 +5,11 @@ long double fabsl(long double x)
__asm__ ("fabs" : "+t"(x));
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/fma.c b/src/math/x86_64/fma.c
index 4dd53f2a..6e7fd138 100644
--- a/src/math/x86_64/fma.c
+++ b/src/math/x86_64/fma.c
@@ -21,3 +21,11 @@ double fma(double x, double y, double z)
#include "../fma.c"
#endif
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/fmaf.c b/src/math/x86_64/fmaf.c
index 30b971ff..dadc0821 100644
--- a/src/math/x86_64/fmaf.c
+++ b/src/math/x86_64/fmaf.c
@@ -21,3 +21,11 @@ float fmaf(float x, float y, float z)
#include "../fmaf.c"
#endif
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/fmodl.c b/src/math/x86_64/fmodl.c
index 3daeab06..f0127707 100644
--- a/src/math/x86_64/fmodl.c
+++ b/src/math/x86_64/fmodl.c
@@ -7,3 +7,11 @@ long double fmodl(long double x, long double y)
while (fpsr & 0x400);
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/llrint.c b/src/math/x86_64/llrint.c
index dd38a722..7ec6383e 100644
--- a/src/math/x86_64/llrint.c
+++ b/src/math/x86_64/llrint.c
@@ -6,3 +6,11 @@ long long llrint(double x)
__asm__ ("cvtsd2si %1, %0" : "=r"(r) : "x"(x));
return r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/llrintf.c b/src/math/x86_64/llrintf.c
index fc8625e8..3883feaa 100644
--- a/src/math/x86_64/llrintf.c
+++ b/src/math/x86_64/llrintf.c
@@ -6,3 +6,11 @@ long long llrintf(float x)
__asm__ ("cvtss2si %1, %0" : "=r"(r) : "x"(x));
return r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/llrintl.c b/src/math/x86_64/llrintl.c
index c439ef28..d74d9e19 100644
--- a/src/math/x86_64/llrintl.c
+++ b/src/math/x86_64/llrintl.c
@@ -6,3 +6,11 @@ long long llrintl(long double x)
__asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st");
return r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/lrint.c b/src/math/x86_64/lrint.c
index a742fec6..c51ededc 100644
--- a/src/math/x86_64/lrint.c
+++ b/src/math/x86_64/lrint.c
@@ -6,3 +6,11 @@ long lrint(double x)
__asm__ ("cvtsd2si %1, %0" : "=r"(r) : "x"(x));
return r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/lrintf.c b/src/math/x86_64/lrintf.c
index 2ba5639d..78f8fdf2 100644
--- a/src/math/x86_64/lrintf.c
+++ b/src/math/x86_64/lrintf.c
@@ -6,3 +6,11 @@ long lrintf(float x)
__asm__ ("cvtss2si %1, %0" : "=r"(r) : "x"(x));
return r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/lrintl.c b/src/math/x86_64/lrintl.c
index 068e2e4d..8a535734 100644
--- a/src/math/x86_64/lrintl.c
+++ b/src/math/x86_64/lrintl.c
@@ -6,3 +6,11 @@ long lrintl(long double x)
__asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st");
return r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/remainderl.c b/src/math/x86_64/remainderl.c
index 8cf75071..0747a6af 100644
--- a/src/math/x86_64/remainderl.c
+++ b/src/math/x86_64/remainderl.c
@@ -7,3 +7,11 @@ long double remainderl(long double x, long double y)
while (fpsr & 0x400);
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/remquol.c b/src/math/x86_64/remquol.c
index 60eef089..d1c69002 100644
--- a/src/math/x86_64/remquol.c
+++ b/src/math/x86_64/remquol.c
@@ -30,3 +30,11 @@ long double remquol(long double x, long double y, int *quo)
*quo = (cx[9]^cy[9]) < 0 ? -qbits : qbits;
return t;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/rintl.c b/src/math/x86_64/rintl.c
index e1a92077..2ce23fa3 100644
--- a/src/math/x86_64/rintl.c
+++ b/src/math/x86_64/rintl.c
@@ -5,3 +5,11 @@ long double rintl(long double x)
__asm__ ("frndint" : "+t"(x));
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/sqrt.c b/src/math/x86_64/sqrt.c
index 657e09e3..03f313d6 100644
--- a/src/math/x86_64/sqrt.c
+++ b/src/math/x86_64/sqrt.c
@@ -5,3 +5,11 @@ double sqrt(double x)
__asm__ ("sqrtsd %1, %0" : "=x"(x) : "x"(x));
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/sqrtf.c b/src/math/x86_64/sqrtf.c
index 720baec6..65c3997b 100644
--- a/src/math/x86_64/sqrtf.c
+++ b/src/math/x86_64/sqrtf.c
@@ -5,3 +5,11 @@ float sqrtf(float x)
__asm__ ("sqrtss %1, %0" : "=x"(x) : "x"(x));
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/math/x86_64/sqrtl.c b/src/math/x86_64/sqrtl.c
index 864cfcc4..81edf51d 100644
--- a/src/math/x86_64/sqrtl.c
+++ b/src/math/x86_64/sqrtl.c
@@ -5,3 +5,11 @@ long double sqrtl(long double x)
__asm__ ("fsqrt" : "+t"(x));
return x;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif