fnegd.c 384 B

123456789101112131415161718192021
  1. // SPDX-License-Identifier: GPL-2.0
  2. // Copyright (C) 2005-2018 Andes Technology Corporation
  3. #include <linux/uaccess.h>
  4. #include <asm/sfp-machine.h>
  5. #include <math-emu/soft-fp.h>
  6. #include <math-emu/double.h>
  7. void fnegd(void *ft, void *fa)
  8. {
  9. FP_DECL_D(A);
  10. FP_DECL_D(R);
  11. FP_DECL_EX;
  12. FP_UNPACK_DP(A, fa);
  13. FP_NEG_D(R, A);
  14. FP_PACK_DP(ft, R);
  15. __FPU_FPCSR |= FP_CUR_EXCEPTIONS;
  16. }