- Linus: drop support for old-style Makefiles entirely. Big.
[davej-history.git] / arch / ppc / math-emu / fsqrts.c
blobce21b8066e693be3c6ab070c34b501a08a8f17a5
1 /* $Id: fsqrts.c,v 1.1 1999/08/23 19:00:03 cort Exp $
2 */
4 #include <linux/types.h>
5 #include <linux/errno.h>
6 #include <asm/uaccess.h>
8 #include "soft-fp.h"
9 #include "double.h"
10 #include "single.h"
12 int
13 fsqrts(void *frD, void *frB)
15 FP_DECL_D(B);
16 FP_DECL_D(R);
17 int ret = 0;
19 #ifdef DEBUG
20 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frB);
21 #endif
23 __FP_UNPACK_D(B, frB);
25 #ifdef DEBUG
26 printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
27 #endif
29 if (B_s && B_c != FP_CLS_ZERO)
30 ret |= EFLAG_VXSQRT;
31 if (B_c == FP_CLS_NAN)
32 ret |= EFLAG_VXSNAN;
34 FP_SQRT_D(R, B);
36 #ifdef DEBUG
37 printk("R: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c);
38 #endif
40 return (ret | __FP_PACK_DS(frD, R));