fs2d.c 424 B

1234567891011121314151617181920212223
  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/double.h>
  6. #include <math-emu/single.h>
  7. #include <math-emu/soft-fp.h>
  8. void fs2d(void *ft, void *fa)
  9. {
  10. FP_DECL_S(A);
  11. FP_DECL_D(R);
  12. FP_DECL_EX;
  13. FP_UNPACK_SP(A, fa);
  14. FP_CONV(D, S, 2, 1, R, A);
  15. FP_PACK_DP(ft, R);
  16. __FPU_FPCSR |= FP_CUR_EXCEPTIONS;
  17. }