vfs: Make __vfs_write() static
[linux/fpc-iii.git] / arch / powerpc / math-emu / fsel.c
blobb0d15e15a5d3920d858a9c199b3863849692b81c
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/types.h>
3 #include <linux/errno.h>
4 #include <linux/uaccess.h>
6 #include <asm/sfp-machine.h>
7 #include <math-emu/soft-fp.h>
8 #include <math-emu/double.h>
10 int
11 fsel(u32 *frD, void *frA, u32 *frB, u32 *frC)
13 FP_DECL_D(A);
14 FP_DECL_EX;
16 #ifdef DEBUG
17 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
18 #endif
20 FP_UNPACK_DP(A, frA);
22 #ifdef DEBUG
23 printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
24 printk("B: %08x %08x\n", frB[0], frB[1]);
25 printk("C: %08x %08x\n", frC[0], frC[1]);
26 #endif
28 if (A_c == FP_CLS_NAN || (A_c != FP_CLS_ZERO && A_s)) {
29 frD[0] = frB[0];
30 frD[1] = frB[1];
31 } else {
32 frD[0] = frC[0];
33 frD[1] = frC[1];
36 #ifdef DEBUG
37 printk("D: %08x.%08x\n", frD[0], frD[1]);
38 #endif
40 return 0;