Blame view

arch/powerpc/math-emu/frsp.c 490 Bytes
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
  #include <linux/types.h>
  #include <linux/errno.h>
  #include <asm/uaccess.h>
d2b194ed8   Kumar Gala   powerpc/math-emu:...
4
5
6
7
  #include <asm/sfp-machine.h>
  #include <math-emu/soft-fp.h>
  #include <math-emu/double.h>
  #include <math-emu/single.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
8
9
10
11
12
  
  int
  frsp(void *frD, void *frB)
  {
  	FP_DECL_D(B);
d2b194ed8   Kumar Gala   powerpc/math-emu:...
13
  	FP_DECL_EX;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
14
15
  
  #ifdef DEBUG
e48b1b452   Harvey Harrison   [POWERPC] Replace...
16
17
  	printk("%s: D %p, B %p
  ", __func__, frD, frB);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
18
  #endif
d2b194ed8   Kumar Gala   powerpc/math-emu:...
19
  	FP_UNPACK_DP(B, frB);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
20
21
22
23
24
  
  #ifdef DEBUG
  	printk("B: %ld %lu %lu %ld (%ld)
  ", B_s, B_f1, B_f0, B_e, B_c);
  #endif
d2b194ed8   Kumar Gala   powerpc/math-emu:...
25
26
27
  	__FP_PACK_DS(frD, B);
  
  	return FP_CUR_EXCEPTIONS;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
28
  }