frsp.c 490 字节
Newer Older
L
Linus Torvalds 已提交
1 2 3 4
#include <linux/types.h>
#include <linux/errno.h>
#include <asm/uaccess.h>

5 6 7 8
#include <asm/sfp-machine.h>
#include <math-emu/soft-fp.h>
#include <math-emu/double.h>
#include <math-emu/single.h>
L
Linus Torvalds 已提交
9 10 11 12 13

int
frsp(void *frD, void *frB)
{
	FP_DECL_D(B);
14
	FP_DECL_EX;
L
Linus Torvalds 已提交
15 16

#ifdef DEBUG
17
	printk("%s: D %p, B %p\n", __func__, frD, frB);
L
Linus Torvalds 已提交
18 19
#endif

20
	FP_UNPACK_DP(B, frB);
L
Linus Torvalds 已提交
21 22 23 24 25

#ifdef DEBUG
	printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
#endif

26 27 28
	__FP_PACK_DS(frD, B);

	return FP_CUR_EXCEPTIONS;
L
Linus Torvalds 已提交
29
}