fp_arith.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. fp_arith.h: floating-point math routines for the Linux-m68k
  4. floating point emulator.
  5. Copyright (c) 1998 David Huggins-Daines.
  6. Somewhat based on the AlphaLinux floating point emulator, by David
  7. Mosberger-Tang.
  8. */
  9. #ifndef _FP_ARITH_H
  10. #define _FP_ARITH_H
  11. /* easy ones */
  12. struct fp_ext *fp_fabs(struct fp_ext *dest, struct fp_ext *src);
  13. struct fp_ext *fp_fneg(struct fp_ext *dest, struct fp_ext *src);
  14. /* straightforward arithmetic */
  15. struct fp_ext *fp_fadd(struct fp_ext *dest, struct fp_ext *src);
  16. struct fp_ext *fp_fsub(struct fp_ext *dest, struct fp_ext *src);
  17. struct fp_ext *fp_fcmp(struct fp_ext *dest, struct fp_ext *src);
  18. struct fp_ext *fp_ftst(struct fp_ext *dest, struct fp_ext *src);
  19. struct fp_ext *fp_fmul(struct fp_ext *dest, struct fp_ext *src);
  20. struct fp_ext *fp_fdiv(struct fp_ext *dest, struct fp_ext *src);
  21. struct fp_ext *fp_fsglmul(struct fp_ext *dest, struct fp_ext *src);
  22. struct fp_ext *fp_fsgldiv(struct fp_ext *dest, struct fp_ext *src);
  23. /* ones that do rounding and integer conversions */
  24. struct fp_ext *fp_fmod(struct fp_ext *dest, struct fp_ext *src);
  25. struct fp_ext *fp_frem(struct fp_ext *dest, struct fp_ext *src);
  26. struct fp_ext *fp_fint(struct fp_ext *dest, struct fp_ext *src);
  27. struct fp_ext *fp_fintrz(struct fp_ext *dest, struct fp_ext *src);
  28. struct fp_ext *fp_fscale(struct fp_ext *dest, struct fp_ext *src);
  29. #endif /* _FP_ARITH_H */