Comments (2)
I "test" for regressions by booting the following operating systems:
- DOS (floppy drive problems)
- Windows 95 (general system state)
- OS/2 Warp 4.5 (esoteric protected mode operations like call gates)
- Windows NT 4.0 (disk drives)
- Windows XP (VESA, uncommon instructions like
bound
, page-split traces) - Mandrake Linux (hardware task switching)
- Windows 7 (MMX, SSE, SSE2, large disk images)
- Windows 10 (PAE, NX, only occasionally, though, since boot times are long)
These operating systems are pretty complete in their usage of the entire x86 instruction set. Now, they won't check for edge-case shift instructions like the ones described in #7 and #8, but they do tell me if some major bug has been introduced.
Another option is to randomly "fuzz" a bunch of instructions with random assignment of operands and inputs, but the process is too unpredictable and non-deterministic for me, and quite a few operations cause undefined behavior or faults, usually in flags (i.e. af
for shifts) but occasionally in outputs as well. With all these constraints, you're better off just going with hard-coded inputs and outputs.
For a more rigorous test, I use the QEMU TCG test suite for i386, which can be found here. I use a version set up on this disk image, which includes test output created on a real processor. It exercises a large variety of arithmetic instructions, but is limited due to the fact that it runs entirely in user mode (so nothing crazy like far calls/far returns).
I've always wanted a series of tests for x86 like the ones that NESDev developers use. I'll have a go at writing some; it'll be fun to write some x86 assembly.
I'll create a separate repository for these tests so that other emulators can use them too; testing an x86 CPU is a project in itself.
from halfix.
Unit tests: https://github.com/nepx/verr.
from halfix.
Related Issues (20)
- Exploring halfix with emulation of web browsers HOT 7
- Native build on osx has missing color channels? HOT 5
- Disk Image documentation update
- Emulator/JS communication - stdin, stdout, stderr? HOT 3
- Options handling HOT 1
- Failing to compile HOT 3
- Windows XP not working in halfix-demo HOT 8
- Can't compile for termux HOT 7
- out of memory HOT 3
- Visual Studio project? HOT 6
- x86-64 and some upgrade? HOT 3
- mobile rendering
- Add networking support HOT 1
- how do i port this app to uwp Universal Windows HOT 3
- how would this work on replit HOT 1
- Can't increase ram? (192mb limit on browser) HOT 4
- how do you run the os in the app version HOT 4
- sorry but the os crashes when i run it
- Is it possible to build on windows? or i need linux?
- Node.js error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from halfix.