[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 0/5] target/m68k: implement 680x0 FPU (part 3
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v2 0/5] target/m68k: implement 680x0 FPU (part 3) |
Date: |
Wed, 06 Dec 2017 10:24:32 +0000 |
User-agent: |
mu4e 1.0-alpha2; emacs 26.0.90 |
Laurent Vivier <address@hidden> writes:
> Implement fmod, frem, fscale, fgetman and fgetexp.
>
> Instead of using functions of libm (v1 of this series)
> and converting between host long double and floatx80 type
> the new version (v2) adds new floatx80 functions in softfloat.
68k used 80bit float, well TIL ;-)
Just for reference Richard and I did a sprint on hacking the softfloat
last week. The results are currently brewing in:
https://github.com/stsquad/qemu/tree/softfloat-and-arm-fp16-v2
The main push has been to decompose 16/32/64 bit floats and have a
common set of operations. This means we work with an internal 64 bit
fractional part and then just round appropriately when we pack the
result. It's a big departure from SoftFloat2a but seeing as we are not
likely to bring in changes from upstream we felt it was worth it from a
code clarity point of view.
However we have punted touching the 80bit code and any potential
quad-precision stuff to a later date, preferably when int128_t is easier
to use. Perhaps it is worth considering that option now?
>
> All the floatx80 functions are copied from "Previous",
> the NeXT Computer Emulator, and written by Andreas Grabher.
>
> Laurent Vivier (5):
> softfloat: add floatx80_mod()
> target/m68k: add fmod/frem
> softfloat: use floatx80_infinity in softfloat
> softfloat: add floatx80_getman(), floatx80_getexp(), floatx80_scale()
> target-m68k: add fscale, fgetman and fgetexp
>
> fpu/softfloat-specialize.h | 29 +++++
> fpu/softfloat.c | 258
> ++++++++++++++++++++++++++++++++++++++++++---
> include/fpu/softfloat.h | 13 ++-
> target/m68k/cpu.h | 1 +
> target/m68k/fpu_helper.c | 48 +++++++++
> target/m68k/helper.h | 5 +
> target/m68k/translate.c | 15 +++
> 7 files changed, 355 insertions(+), 14 deletions(-)
--
Alex Bennée