Question

Where can I find code (bootable image, ROM dump, executable file) to test all features of the CPU to check if an emulator is emulating everything correctly? Things like faults, exceptions, unusual instructions, 286 protected mode, debug register behaviour and so on. Pretty much every feature of a CPU.

Is there a list of CPU quirks for various CPU flavors? I know some instructions that execute differently on an Intel and on AMD, but I wonder if there's a large list.

Thank you.

Was it helpful?

Solution

Complete instruction and operand coverage for an x86 emulator or simulator is probably going to be elusive. http://wiki.qemu.org/Testing has some images you could try for boot time coverage. Their mailing lists might also be helpful for exploring ways to figure out a priori what kind of instruction and feature coverage booting one or the other of these images and executing something on it is going to get you.

Same deal with bochs. I found a thread on their mailing list indicating that they might have some ideas and possibly even code that could be useful to you.

Intel Pin and tools based on it like PinPoints and SimPoint might be helpful for generating representative traces and getting good - if not necessarily perfect and complete - coverage of the instruction set and CPU features.

Agner Fog's site and http://www.sandpile.org/ might be useful starting points for uncovering quirky, undefined or buggy behavior in particular CPUs, although with a quick search at those two sites I wasn't able to turn up a more directly relevant link.

Whatever it is that you're up to, I wish you luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top