blob: f694440ddc003a276ef5630f4ad3d5b259a18cc4 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <linux/types.h>
2#include <linux/errno.h>
3#include <asm/uaccess.h>
4
Kumar Galad2b194e2008-06-04 02:59:29 -05005#include <asm/sfp-machine.h>
6#include <math-emu/soft-fp.h>
7#include <math-emu/double.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
9int
10fctiw(u32 *frD, void *frB)
11{
12 FP_DECL_D(B);
Kumar Galad2b194e2008-06-04 02:59:29 -050013 FP_DECL_EX;
Linus Torvalds1da177e2005-04-16 15:20:36 -070014 unsigned int r;
15
Kumar Galad2b194e2008-06-04 02:59:29 -050016 FP_UNPACK_DP(B, frB);
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 FP_TO_INT_D(r, B, 32, 1);
18 frD[1] = r;
19
20#ifdef DEBUG
Harvey Harrisone48b1b42008-03-29 08:21:07 +110021 printk("%s: D %p, B %p: ", __func__, frD, frB);
Linus Torvalds1da177e2005-04-16 15:20:36 -070022 dump_double(frD);
23 printk("\n");
24#endif
25
26 return 0;
27}