fctiwz.c (96916090f488986a4ebb8e9ffa6a3b50881d5ccd) | fctiwz.c (d2b194ed820880eb19c43b9c10d9f5f30026ee54) |
---|---|
1#include <linux/types.h> 2#include <linux/errno.h> 3#include <asm/uaccess.h> 4 | 1#include <linux/types.h> 2#include <linux/errno.h> 3#include <asm/uaccess.h> 4 |
5#include "soft-fp.h" 6#include "double.h" | 5#include <asm/sfp-machine.h> 6#include <math-emu/soft-fp.h> 7#include <math-emu/double.h> |
7 8int 9fctiwz(u32 *frD, void *frB) 10{ 11 FP_DECL_D(B); | 8 9int 10fctiwz(u32 *frD, void *frB) 11{ 12 FP_DECL_D(B); |
13 FP_DECL_EX; |
|
12 u32 fpscr; 13 unsigned int r; 14 15 fpscr = __FPU_FPSCR; 16 __FPU_FPSCR &= ~(3); 17 __FPU_FPSCR |= FP_RND_ZERO; 18 | 14 u32 fpscr; 15 unsigned int r; 16 17 fpscr = __FPU_FPSCR; 18 __FPU_FPSCR &= ~(3); 19 __FPU_FPSCR |= FP_RND_ZERO; 20 |
19 __FP_UNPACK_D(B, frB); | 21 FP_UNPACK_DP(B, frB); |
20 FP_TO_INT_D(r, B, 32, 1); 21 frD[1] = r; 22 23 __FPU_FPSCR = fpscr; 24 25#ifdef DEBUG 26 printk("%s: D %p, B %p: ", __func__, frD, frB); 27 dump_double(frD); 28 printk("\n"); 29#endif 30 31 return 0; 32} | 22 FP_TO_INT_D(r, B, 32, 1); 23 frD[1] = r; 24 25 __FPU_FPSCR = fpscr; 26 27#ifdef DEBUG 28 printk("%s: D %p, B %p: ", __func__, frD, frB); 29 dump_double(frD); 30 printk("\n"); 31#endif 32 33 return 0; 34} |