xref: /openbmc/linux/arch/powerpc/math-emu/fctiw.c (revision 2891f2d5)
1 #include <linux/types.h>
2 #include <linux/errno.h>
3 #include <linux/uaccess.h>
4 
5 #include <asm/sfp-machine.h>
6 #include <math-emu/soft-fp.h>
7 #include <math-emu/double.h>
8 
9 int
10 fctiw(u32 *frD, void *frB)
11 {
12 	FP_DECL_D(B);
13 	FP_DECL_EX;
14 	unsigned int r;
15 
16 	FP_UNPACK_DP(B, frB);
17 	FP_TO_INT_D(r, B, 32, 1);
18 	frD[1] = r;
19 
20 #ifdef DEBUG
21 	printk("%s: D %p, B %p: ", __func__, frD, frB);
22 	dump_double(frD);
23 	printk("\n");
24 #endif
25 
26 	return 0;
27 }
28