aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/alpha
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-09-05 09:07:19 +0000
committerAndreas Jaeger <aj@suse.de>2000-09-05 09:07:19 +0000
commita9591af9e9ff0ecd0ae09214bd6e19157bff61d8 (patch)
tree550b41649c499b71688c6664435f64fd98992f99 /sysdeps/alpha
parent584bbcdd2cc662d532024ca62db53413f6d05a15 (diff)
downloadglibc-a9591af9e9ff0ecd0ae09214bd6e19157bff61d8.tar
glibc-a9591af9e9ff0ecd0ae09214bd6e19157bff61d8.tar.gz
glibc-a9591af9e9ff0ecd0ae09214bd6e19157bff61d8.tar.bz2
glibc-a9591af9e9ff0ecd0ae09214bd6e19157bff61d8.zip
Moved from soft-fp/sysdeps/sparc/sparc64/s_scalbnl.c
Diffstat (limited to 'sysdeps/alpha')
-rw-r--r--sysdeps/alpha/soft-fp/sfp-machine.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/sysdeps/alpha/soft-fp/sfp-machine.h b/sysdeps/alpha/soft-fp/sfp-machine.h
new file mode 100644
index 0000000000..73b934ddce
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/sfp-machine.h
@@ -0,0 +1,35 @@
+#define _FP_W_TYPE_SIZE 64
+#define _FP_W_TYPE unsigned long
+#define _FP_WS_TYPE signed long
+#define _FP_I_TYPE long
+
+#define _alpha_mul_64_128(rhi, rlo, x, y) \
+ __asm__("umulh %2,%3,%0; mulq %2,%3,%1" \
+ : "=&r"(rhi), "=r"(rlo) : "r"(x), "r"(y))
+
+#define _FP_MUL_MEAT_S(R,X,Y) \
+ _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y)
+#define _FP_MUL_MEAT_D(R,X,Y) \
+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,_alpha_mul_64_128)
+#define _FP_MUL_MEAT_Q(R,X,Y) \
+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,_alpha_mul_64_128)
+
+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm)
+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
+
+#define _FP_NANFRAC_S _FP_QNANBIT_S
+#define _FP_NANFRAC_D _FP_QNANBIT_D
+#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0
+/* FIXME: This is just a wild guess */
+#define _FP_NANSIGN_S 1
+#define _FP_NANSIGN_D 1
+#define _FP_NANSIGN_Q 1
+
+#define _FP_KEEPNANFRACP 1
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do { \
+ R##_s = Y##_s; \
+ _FP_FRAC_COPY_##wc(R,Y); \
+ R##_c = FP_CLS_NAN; \
+ } while (0)