fsi2d.c 384 B

12345678910111213141516171819202122
  1. // SPDX-License-Identifier: GPL-2.0
  2. // Copyright (C) 2005-2019 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 fsi2d(void *ft, void *fa)
  8. {
  9. int a = *(int *)fa;
  10. FP_DECL_D(R);
  11. FP_DECL_EX;
  12. FP_FROM_INT_D(R, a, 32, int);
  13. FP_PACK_DP(ft, R);
  14. __FPU_FPCSR |= FP_CUR_EXCEPTIONS;
  15. }