Are there any PC emulators for x86 that can be configured to emulate hardware flaws such as the faulty original Pentium FDIV instruction?
I know this would basically be a useless feature, except for scientific curiousity. I think it could be interesting to some people to see first hand what sort of errors that old faulty CPUs would produce.
Emulators for other faulty platforms might be interesting too. Not like I'd expect any programmers out there to deliberately write faulty instructions though, except as stated, something of a scientific exercise.
I would solve this problem with QEMU and change the definition of the instruction to generate IR for the flawed behavior. I would force it to use software emulation of course as this would no longer properly be the x86 architecture.
I don’t know of any software that does that by default.
Of course I wouldn't expect any emulator to run faulty instructions by default, but it seems to me that it would be an interesting option for digital historians to study, if for no other reason than shits and giggles..
This might be something PCem can do. LTT talked about it for emulating PC hardware (here) to install and play MS-DOS games accurately. I see someone in the PCem forum 10 years ago mentioning the recreation of FDIV bugs.
Qemu, i386 target, not sure if they use TCG for that, they probably do, basically have a specific machine model that handles fdiv with a lookup table or something, honestly not sure how it went wrong.