Vincent Chen | 1ac8325 | 2018-11-22 11:14:35 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | // Copyright (C) 2005-2018 Andes Technology Corporation |
| 3 | #include <linux/uaccess.h> |
| 4 | |
| 5 | #include <asm/sfp-machine.h> |
| 6 | #include <math-emu/soft-fp.h> |
| 7 | #include <math-emu/double.h> |
| 8 | void faddd(void *ft, void *fa, void *fb) |
| 9 | { |
| 10 | FP_DECL_D(A); |
| 11 | FP_DECL_D(B); |
| 12 | FP_DECL_D(R); |
| 13 | FP_DECL_EX; |
| 14 | |
| 15 | FP_UNPACK_DP(A, fa); |
| 16 | FP_UNPACK_DP(B, fb); |
| 17 | |
| 18 | FP_ADD_D(R, A, B); |
| 19 | |
| 20 | FP_PACK_DP(ft, R); |
| 21 | |
| 22 | __FPU_FPCSR |= FP_CUR_EXCEPTIONS; |
| 23 | |
| 24 | } |