WIP FPC-III support
[linux/fpc-iii.git] / arch / powerpc / math-emu / fctiw.c
blobebb0f11e735ea743984df15be7ec9d6d728db750
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 fctiw(u32 *frD, void *frB)
13 FP_DECL_D(B);
14 FP_DECL_EX;
15 unsigned int r;
17 FP_UNPACK_DP(B, frB);
18 FP_TO_INT_D(r, B, 32, 1);
19 frD[1] = r;
21 #ifdef DEBUG
22 printk("%s: D %p, B %p: ", __func__, frD, frB);
23 dump_double(frD);
24 printk("\n");
25 #endif
27 return 0;