xref: /openbmc/linux/arch/powerpc/math-emu/frsp.c (revision cc8bbe1a)
1 #include <linux/types.h>
2 #include <linux/errno.h>
3 #include <asm/uaccess.h>
4 
5 #include <asm/sfp-machine.h>
6 #include <math-emu/soft-fp.h>
7 #include <math-emu/double.h>
8 #include <math-emu/single.h>
9 
10 int
11 frsp(void *frD, void *frB)
12 {
13 	FP_DECL_D(B);
14 	FP_DECL_EX;
15 
16 #ifdef DEBUG
17 	printk("%s: D %p, B %p\n", __func__, frD, frB);
18 #endif
19 
20 	FP_UNPACK_DP(B, frB);
21 
22 #ifdef DEBUG
23 	printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
24 #endif
25 
26 	__FP_PACK_DS(frD, B);
27 
28 	return FP_CUR_EXCEPTIONS;
29 }
30