diff options
author | Mark Brown <broonie@kernel.org> | 2019-06-10 20:52:53 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-10 20:52:53 +0300 |
commit | 4343f61103cdb8ccd6f3d5dd7168f1176a1cee37 (patch) | |
tree | 3db0a2e099cf7feb0c2d60d2a4bf1bf10d5253db /arch/nds32/math-emu/fsi2d.c | |
parent | aef9752274f4045b0dab577e113da63c96832f77 (diff) | |
parent | d1fdb6d8f6a4109a4263176c84b899076a5f8008 (diff) | |
download | linux-4343f61103cdb8ccd6f3d5dd7168f1176a1cee37.tar.xz |
Merge tag 'v5.2-rc4' into spi-5.3
Linux 5.2-rc4
Diffstat (limited to 'arch/nds32/math-emu/fsi2d.c')
-rw-r--r-- | arch/nds32/math-emu/fsi2d.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/nds32/math-emu/fsi2d.c b/arch/nds32/math-emu/fsi2d.c new file mode 100644 index 000000000000..6b04cec0c5c5 --- /dev/null +++ b/arch/nds32/math-emu/fsi2d.c @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0 +// Copyright (C) 2005-2019 Andes Technology Corporation +#include <linux/uaccess.h> + +#include <asm/sfp-machine.h> +#include <math-emu/soft-fp.h> +#include <math-emu/double.h> + +void fsi2d(void *ft, void *fa) +{ + int a = *(int *)fa; + + FP_DECL_D(R); + FP_DECL_EX; + + FP_FROM_INT_D(R, a, 32, int); + + FP_PACK_DP(ft, R); + + __FPU_FPCSR |= FP_CUR_EXCEPTIONS; + +} |