diff options
Diffstat (limited to 'arch/m68k/math-emu/fp_log.c')
-rw-r--r-- | arch/m68k/math-emu/fp_log.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/m68k/math-emu/fp_log.c b/arch/m68k/math-emu/fp_log.c index a8eac8c81757..2426634c4ba7 100644 --- a/arch/m68k/math-emu/fp_log.c +++ b/arch/m68k/math-emu/fp_log.c @@ -15,6 +15,7 @@ */ +#include "fp_arith.h" #include "fp_emu.h" static const struct fp_ext fp_one = @@ -22,9 +23,6 @@ static const struct fp_ext fp_one = .exp = 0x3fff, }; -extern struct fp_ext *fp_fadd(struct fp_ext *dest, const struct fp_ext *src); -extern struct fp_ext *fp_fdiv(struct fp_ext *dest, const struct fp_ext *src); - struct fp_ext * fp_fsqrt(struct fp_ext *dest, struct fp_ext *src) { @@ -70,7 +68,8 @@ fp_fsqrt(struct fp_ext *dest, struct fp_ext *src) * sqrt(x) = 1 + 1/2*(x-1) * = 1/2*(1+x) */ - fp_fadd(dest, &fp_one); + /* It is safe to cast away the constness, as fp_one is normalized */ + fp_fadd(dest, (struct fp_ext *)&fp_one); dest->exp--; /* * 1/2 */ /* |