v86/tests/qemu
Fabian b96f984963 Use softfloat f80 for x87 fpu
This fixes several long-standing issues with x87 float emulation, in particular:

- 80 bit precision floats, fixing Haiku after its switch to musl libc (hrev53728)
- the precision bit in the x87 control word
- fucom and fucomi (unordered comparisons)
- aliasing of x87 and mmx registers
- rounding during conversion to integers

Operations that are not implemented in softfloat were implemented by
converting to f64 (sine, pow, ln, etc.) and thus operate with lower
precision.

Softfloat has been combined into a single file using a script [0] and checked into the repository.

[0] 57df21e2eb/contrib/single_file_libs/combine.sh
2020-12-31 19:14:32 -06:00
..
compiler.h Squash 2020-07-21 20:10:12 -05:00
config-host.h first public release 2013-11-06 01:12:55 +01:00
LICENSE first public release 2013-11-06 01:12:55 +01:00
Makefile Enable some qemu fpu tests that were previously not working 2020-12-31 19:14:32 -06:00
Readme.md Update testing readmes 2017-06-19 15:06:50 -05:00
run-qemu.js Avoid console.assert (doesn't throw) 2020-12-31 19:14:30 -06:00
run.js Add TEST_RELEASE_BUILD to run tests on release build 2020-08-30 19:37:15 -05:00
test-i386-code16.S first public release 2013-11-06 01:12:55 +01:00
test-i386-muldiv.h first public release 2013-11-06 01:12:55 +01:00
test-i386-shift.h more tests 2015-09-12 00:18:18 +02:00
test-i386-vm86.S first public release 2013-11-06 01:12:55 +01:00
test-i386.c Use softfloat f80 for x87 fpu 2020-12-31 19:14:32 -06:00
test-i386.h more tests 2015-09-12 00:18:18 +02:00

How to run:

  • Obtain the linux3.iso image (see Readme.md)
  • Run make test-i386
  • Get the result on the host: ./test-386 > reference
  • Get the result from the VM: ./run.js > result
  • The difference should be empty: diff reference result