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