fctiw.c 425 B

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