David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 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 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 12 | |
| 13 | */ |
| 14 | |
| 15 | #ifndef FP_ARITH_H |
| 16 | #define FP_ARITH_H |
| 17 | |
| 18 | /* easy ones */ |
| 19 | struct fp_ext * |
| 20 | fp_fabs(struct fp_ext *dest, struct fp_ext *src); |
| 21 | struct fp_ext * |
| 22 | fp_fneg(struct fp_ext *dest, struct fp_ext *src); |
| 23 | |
| 24 | /* straightforward arithmetic */ |
| 25 | struct fp_ext * |
| 26 | fp_fadd(struct fp_ext *dest, struct fp_ext *src); |
| 27 | struct fp_ext * |
| 28 | fp_fsub(struct fp_ext *dest, struct fp_ext *src); |
| 29 | struct fp_ext * |
| 30 | fp_fcmp(struct fp_ext *dest, struct fp_ext *src); |
| 31 | struct fp_ext * |
| 32 | fp_ftst(struct fp_ext *dest, struct fp_ext *src); |
| 33 | struct fp_ext * |
| 34 | fp_fmul(struct fp_ext *dest, struct fp_ext *src); |
| 35 | struct fp_ext * |
| 36 | fp_fdiv(struct fp_ext *dest, struct fp_ext *src); |
| 37 | |
| 38 | /* ones that do rounding and integer conversions */ |
| 39 | struct fp_ext * |
| 40 | fp_fmod(struct fp_ext *dest, struct fp_ext *src); |
| 41 | struct fp_ext * |
| 42 | fp_frem(struct fp_ext *dest, struct fp_ext *src); |
| 43 | struct fp_ext * |
| 44 | fp_fint(struct fp_ext *dest, struct fp_ext *src); |
| 45 | struct fp_ext * |
| 46 | fp_fintrz(struct fp_ext *dest, struct fp_ext *src); |
| 47 | struct fp_ext * |
| 48 | fp_fscale(struct fp_ext *dest, struct fp_ext *src); |
| 49 | |
| 50 | #endif /* FP_ARITH__H */ |