summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/math/s390x
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 13:54:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 13:54:38 +0000
commit8c1ab65c0f548d20b7f177bdb736daaf603340e1 (patch)
treedf55b7e75bf43f2bf500845b105afe3ac3a5157e /libc-top-half/musl/src/math/s390x
parentInitial commit. (diff)
downloadwasi-libc-upstream/0.0_git20221206.8b7148f.tar.xz
wasi-libc-upstream/0.0_git20221206.8b7148f.zip
Adding upstream version 0.0~git20221206.8b7148f.upstream/0.0_git20221206.8b7148f
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libc-top-half/musl/src/math/s390x')
-rw-r--r--libc-top-half/musl/src/math/s390x/ceil.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/ceilf.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/ceill.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/fabs.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/fabsf.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/fabsl.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/floor.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/floorf.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/floorl.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/fma.c7
-rw-r--r--libc-top-half/musl/src/math/s390x/fmaf.c7
-rw-r--r--libc-top-half/musl/src/math/s390x/nearbyint.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/nearbyintf.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/nearbyintl.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/rint.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/rintf.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/rintl.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/round.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/roundf.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/roundl.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/sqrt.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/sqrtf.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/sqrtl.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/trunc.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/truncf.c15
-rw-r--r--libc-top-half/musl/src/math/s390x/truncl.c15
26 files changed, 374 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/s390x/ceil.c b/libc-top-half/musl/src/math/s390x/ceil.c
new file mode 100644
index 0000000..aee17df
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/ceil.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+double ceil(double x)
+{
+ __asm__ ("fidbra %0, 6, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../ceil.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/ceilf.c b/libc-top-half/musl/src/math/s390x/ceilf.c
new file mode 100644
index 0000000..29ba8d4
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/ceilf.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+float ceilf(float x)
+{
+ __asm__ ("fiebra %0, 6, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../ceilf.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/ceill.c b/libc-top-half/musl/src/math/s390x/ceill.c
new file mode 100644
index 0000000..b838dc1
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/ceill.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double ceill(long double x)
+{
+ __asm__ ("fixbra %0, 6, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../ceill.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/fabs.c b/libc-top-half/musl/src/math/s390x/fabs.c
new file mode 100644
index 0000000..9bb51cb
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/fabs.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+double fabs(double x)
+{
+ __asm__ ("lpdbr %0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../fabs.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/fabsf.c b/libc-top-half/musl/src/math/s390x/fabsf.c
new file mode 100644
index 0000000..9fd96bc
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/fabsf.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+float fabsf(float x)
+{
+ __asm__ ("lpebr %0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../fabsf.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/fabsl.c b/libc-top-half/musl/src/math/s390x/fabsl.c
new file mode 100644
index 0000000..65f1005
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/fabsl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double fabsl(long double x)
+{
+ __asm__ ("lpxbr %0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../fabsl.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/floor.c b/libc-top-half/musl/src/math/s390x/floor.c
new file mode 100644
index 0000000..4c0c7f1
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/floor.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+double floor(double x)
+{
+ __asm__ ("fidbra %0, 7, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../floor.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/floorf.c b/libc-top-half/musl/src/math/s390x/floorf.c
new file mode 100644
index 0000000..ea28ec7
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/floorf.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+float floorf(float x)
+{
+ __asm__ ("fiebra %0, 7, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../floorf.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/floorl.c b/libc-top-half/musl/src/math/s390x/floorl.c
new file mode 100644
index 0000000..8a0e16a
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/floorl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double floorl(long double x)
+{
+ __asm__ ("fixbra %0, 7, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../floorl.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/fma.c b/libc-top-half/musl/src/math/s390x/fma.c
new file mode 100644
index 0000000..86da0e4
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/fma.c
@@ -0,0 +1,7 @@
+#include <math.h>
+
+double fma(double x, double y, double z)
+{
+ __asm__ ("madbr %0, %1, %2" : "+f"(z) : "f"(x), "f"(y));
+ return z;
+}
diff --git a/libc-top-half/musl/src/math/s390x/fmaf.c b/libc-top-half/musl/src/math/s390x/fmaf.c
new file mode 100644
index 0000000..f1aec6a
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/fmaf.c
@@ -0,0 +1,7 @@
+#include <math.h>
+
+float fmaf(float x, float y, float z)
+{
+ __asm__ ("maebr %0, %1, %2" : "+f"(z) : "f"(x), "f"(y));
+ return z;
+}
diff --git a/libc-top-half/musl/src/math/s390x/nearbyint.c b/libc-top-half/musl/src/math/s390x/nearbyint.c
new file mode 100644
index 0000000..b70da52
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/nearbyint.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+double nearbyint(double x)
+{
+ __asm__ ("fidbra %0, 0, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../nearbyint.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/nearbyintf.c b/libc-top-half/musl/src/math/s390x/nearbyintf.c
new file mode 100644
index 0000000..704f267
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/nearbyintf.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+float nearbyintf(float x)
+{
+ __asm__ ("fiebra %0, 0, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../nearbyintf.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/nearbyintl.c b/libc-top-half/musl/src/math/s390x/nearbyintl.c
new file mode 100644
index 0000000..b4bd552
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/nearbyintl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double nearbyintl(long double x)
+{
+ __asm__ ("fixbra %0, 0, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../nearbyintl.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/rint.c b/libc-top-half/musl/src/math/s390x/rint.c
new file mode 100644
index 0000000..b02f09e
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/rint.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+double rint(double x)
+{
+ __asm__ ("fidbr %0, 0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../rint.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/rintf.c b/libc-top-half/musl/src/math/s390x/rintf.c
new file mode 100644
index 0000000..c9f1313
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/rintf.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+float rintf(float x)
+{
+ __asm__ ("fiebr %0, 0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../rintf.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/rintl.c b/libc-top-half/musl/src/math/s390x/rintl.c
new file mode 100644
index 0000000..bae5318
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/rintl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double rintl(long double x)
+{
+ __asm__ ("fixbr %0, 0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../rintl.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/round.c b/libc-top-half/musl/src/math/s390x/round.c
new file mode 100644
index 0000000..71f8025
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/round.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+double round(double x)
+{
+ __asm__ ("fidbra %0, 1, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../round.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/roundf.c b/libc-top-half/musl/src/math/s390x/roundf.c
new file mode 100644
index 0000000..46d2e10
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/roundf.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+float roundf(float x)
+{
+ __asm__ ("fiebra %0, 1, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../roundf.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/roundl.c b/libc-top-half/musl/src/math/s390x/roundl.c
new file mode 100644
index 0000000..ce644dd
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/roundl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double roundl(long double x)
+{
+ __asm__ ("fixbra %0, 1, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../roundl.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/sqrt.c b/libc-top-half/musl/src/math/s390x/sqrt.c
new file mode 100644
index 0000000..a80dc4a
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/sqrt.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+double sqrt(double x)
+{
+ __asm__ ("sqdbr %0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../sqrt.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/sqrtf.c b/libc-top-half/musl/src/math/s390x/sqrtf.c
new file mode 100644
index 0000000..52f57eb
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/sqrtf.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+float sqrtf(float x)
+{
+ __asm__ ("sqebr %0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../sqrtf.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/sqrtl.c b/libc-top-half/musl/src/math/s390x/sqrtl.c
new file mode 100644
index 0000000..5702d54
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/sqrtl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double sqrtl(long double x)
+{
+ __asm__ ("sqxbr %0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../sqrtl.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/trunc.c b/libc-top-half/musl/src/math/s390x/trunc.c
new file mode 100644
index 0000000..3e5d886
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/trunc.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+double trunc(double x)
+{
+ __asm__ ("fidbra %0, 5, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../trunc.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/truncf.c b/libc-top-half/musl/src/math/s390x/truncf.c
new file mode 100644
index 0000000..9097bac
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/truncf.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+float truncf(float x)
+{
+ __asm__ ("fiebra %0, 5, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../truncf.c"
+
+#endif
diff --git a/libc-top-half/musl/src/math/s390x/truncl.c b/libc-top-half/musl/src/math/s390x/truncl.c
new file mode 100644
index 0000000..4eb920a
--- /dev/null
+++ b/libc-top-half/musl/src/math/s390x/truncl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double truncl(long double x)
+{
+ __asm__ ("fixbra %0, 5, %1, 4" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../truncl.c"
+
+#endif