these were introduced in z196 and not available in the baseline (z900) ISA level. use __HTM__ as an alternate indicator for ISA level, since gcc did not define __ARCH__ until 7.x. patch by David Edelsohn.
@@ -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
+float ceilf(float x)
+ __asm__ ("fiebra %0, 6, %1, 4" : "=f"(x) : "f"(x));
+#include "../ceilf.c"
+long double ceill(long double x)
+ __asm__ ("fixbra %0, 6, %1, 4" : "=f"(x) : "f"(x));
+#include "../ceill.c"
+double fabs(double x)
+ __asm__ ("lpdbr %0, %1" : "=f"(x) : "f"(x));
+#include "../fabs.c"
+float fabsf(float x)
+ __asm__ ("lpebr %0, %1" : "=f"(x) : "f"(x));
+#include "../fabsf.c"
+long double fabsl(long double x)
+ __asm__ ("lpxbr %0, %1" : "=f"(x) : "f"(x));
+#include "../fabsl.c"
+double floor(double x)
+ __asm__ ("fidbra %0, 7, %1, 4" : "=f"(x) : "f"(x));
+#include "../floor.c"
+float floorf(float x)
+ __asm__ ("fiebra %0, 7, %1, 4" : "=f"(x) : "f"(x));
+#include "../floorf.c"
+long double floorl(long double x)
+ __asm__ ("fixbra %0, 7, %1, 4" : "=f"(x) : "f"(x));
+#include "../floorl.c"
+double nearbyint(double x)
+ __asm__ ("fidbra %0, 0, %1, 4" : "=f"(x) : "f"(x));
+#include "../nearbyint.c"
+float nearbyintf(float x)
+ __asm__ ("fiebra %0, 0, %1, 4" : "=f"(x) : "f"(x));
+#include "../nearbyintf.c"
+long double nearbyintl(long double x)
+ __asm__ ("fixbra %0, 0, %1, 4" : "=f"(x) : "f"(x));
+#include "../nearbyintl.c"
+double rint(double x)
+ __asm__ ("fidbr %0, 0, %1" : "=f"(x) : "f"(x));
+#include "../rint.c"
+float rintf(float x)
+ __asm__ ("fiebr %0, 0, %1" : "=f"(x) : "f"(x));
+#include "../rintf.c"
+long double rintl(long double x)
+ __asm__ ("fixbr %0, 0, %1" : "=f"(x) : "f"(x));
+#include "../rintl.c"
+double round(double x)
+ __asm__ ("fidbra %0, 1, %1, 4" : "=f"(x) : "f"(x));
+#include "../round.c"
+float roundf(float x)
+ __asm__ ("fiebra %0, 1, %1, 4" : "=f"(x) : "f"(x));
+#include "../roundf.c"
+long double roundl(long double x)
+ __asm__ ("fixbra %0, 1, %1, 4" : "=f"(x) : "f"(x));
+#include "../roundl.c"
+double sqrt(double x)
+ __asm__ ("sqdbr %0, %1" : "=f"(x) : "f"(x));
+#include "../sqrt.c"
+float sqrtf(float x)
+ __asm__ ("sqebr %0, %1" : "=f"(x) : "f"(x));
+#include "../sqrtf.c"
+long double sqrtl(long double x)
+ __asm__ ("sqxbr %0, %1" : "=f"(x) : "f"(x));
+#include "../sqrtl.c"
+double trunc(double x)
+ __asm__ ("fidbra %0, 5, %1, 4" : "=f"(x) : "f"(x));
+#include "../trunc.c"
+float truncf(float x)
+ __asm__ ("fiebra %0, 5, %1, 4" : "=f"(x) : "f"(x));
+#include "../truncf.c"
+long double truncl(long double x)
+ __asm__ ("fixbra %0, 5, %1, 4" : "=f"(x) : "f"(x));
+#include "../truncl.c"