Le 21/03/2018 à 21:11, Emilio G. Cota a écrit : > The appended paves the way for leveraging the host FPU for a subset > of guest FP operations. For most guest workloads (e.g. FP flags > aren't ever cleared, inexact occurs often and rounding is set to the > default [to nearest]) this will yield sizable performance speedups. > > The approach followed here avoids checking the FP exception flags register. > See the comment at the top of hostfloat.c for details. > > This assumes that QEMU is running on an IEEE754-compliant FPU and > that the rounding is set to the default (to nearest). The > implementation-dependent specifics of the FPU should not matter; things > like tininess detection and snan representation are still dealt with in > soft-fp. However, this approach will break on most hosts if we compile > QEMU with flags such as -ffast-math. We control the flags so this should > be easy to enforce though. > > The licensing in softfloat.h is complicated at best, so to keep things > simple I'm adding this as a separate, GPL'ed file. > > This patch just adds some boilerplate code; subsequent patches add > operations, one per commit to ease bisection. > > Signed-off-by: Emilio G. Cota <[email protected]> > --- > Makefile.target | 2 +- > include/fpu/hostfloat.h | 14 +++++++ > include/fpu/softfloat.h | 1 + > fpu/hostfloat.c | 96 > +++++++++++++++++++++++++++++++++++++++++++++++ > target/m68k/Makefile.objs | 2 +- > tests/fp-test/Makefile | 2 +- > 6 files changed, 114 insertions(+), 3 deletions(-) > create mode 100644 include/fpu/hostfloat.h > create mode 100644 fpu/hostfloat.c > ... > diff --git a/target/m68k/Makefile.objs b/target/m68k/Makefile.objs > index ac61948..2868b11 100644 > --- a/target/m68k/Makefile.objs > +++ b/target/m68k/Makefile.objs > @@ -1,5 +1,5 @@ > obj-y += m68k-semi.o > obj-y += translate.o op_helper.o helper.o cpu.o > -obj-y += fpu_helper.o softfloat.o > +obj-y += fpu_helper.o softfloat.o hostfloat.o
I don't think you need to add hostfloat.o here, the softfloat.o in this list contains function specific to m68k emulation, it's not the one from fpu/ Thanks, Laurent
