PageRenderTime 19ms CodeModel.GetById 10ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/arch/powerpc/math-emu/fctiw.c

http://github.com/mirrors/linux
C | 28 lines | 22 code | 5 blank | 1 comment | 0 complexity | 74e0fbb78d6a3575f828ec8f4aa317db MD5 | raw file
 1// SPDX-License-Identifier: GPL-2.0
 2#include <linux/types.h>
 3#include <linux/errno.h>
 4#include <linux/uaccess.h>
 5
 6#include <asm/sfp-machine.h>
 7#include <math-emu/soft-fp.h>
 8#include <math-emu/double.h>
 9
10int
11fctiw(u32 *frD, void *frB)
12{
13	FP_DECL_D(B);
14	FP_DECL_EX;
15	unsigned int r;
16
17	FP_UNPACK_DP(B, frB);
18	FP_TO_INT_D(r, B, 32, 1);
19	frD[1] = r;
20
21#ifdef DEBUG
22	printk("%s: D %p, B %p: ", __func__, frD, frB);
23	dump_double(frD);
24	printk("\n");
25#endif
26
27	return 0;
28}