VOGONS


First post, by donkeyulli

User metadata
Rank Newbie
Rank
Newbie

Hallo 😀

Is there any tool around to test the complete instruction Set of an x86 CPU?

I ask, because I need a tool to test a program and see if the program emulates the CPU right or not.

I know about Benchmark Tools, but I think that these Tools are only use part of the x86 Instruction Set.

Best Regards and thanks for your help.

donkeyulli

Reply 1 of 14, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

A x86 emulator test suite / emulator tester? I don't think one exists.

I've seen them for 6502, 6809, 8080, 8085, Z80, 68K, PPC... I don't remember one for x86.

This looks interesting:
https://code.google.com/p/corkami/source/brow … es32.asm?r=1569

[EDIT] Qemu may have a partial x86 test suite, try them?

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 2 of 14, by rodimus80

User metadata
Rank Member
Rank
Member

Is there a thread that lists the best tools for benchmarking each operating system?

Reply 3 of 14, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Maybe? But it's not this one. This thread is actually about torture-testing x86 CPU emulators, being as it is properly placed within the "PC Emulation" subforum 😀

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 4 of 14, by donkeyulli

User metadata
Rank Newbie
Rank
Newbie

Thanks for the link. The Code looks interesting and as a start, I will pick it up and expand it for my needs.

Thanks for your help and your answers.

Best Regards, donkeyulli

Reply 5 of 14, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

No problem!

I'd recommend that if you are building your own x86 emulator test suite that you look to other CPU emulator test suites for broad inspiration:
I have copies of Gwenole Beauchesne's GPL-licensed M68K-Tester and PPCTorture / PPC-Tester and their test results, though that might be still floating out there.
http://web.archive.org/web/20090417202939/htt … jects/68ktester
http://web.archive.org/web/20090131234602/htt … jects/ppctester

ZEXALL (Z80): http://mdfs.net/Software/Z80/Exerciser/

8080/8085: http://www.idb.me.uk/sunhillow/8080.html

6502: http://visual6502.org/wiki/index.php?title=6502TestPrograms

I'm sure there's others. I still need to investigate if Qemu has one as rumored.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 6 of 14, by Calvero

User metadata
Rank Member
Rank
Member

You might want to try Topbench.

Reply 7 of 14, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Stiletto wrote:

I'm sure there's others. I still need to investigate if Qemu has one as rumored.

Got it! Yes, QEMU does/did. Gimme a little bit, gonna do a write-up.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 8 of 14, by Quadko

User metadata
Rank Newbie
Rank
Newbie

Is there an existing available suite of tests I can use while developing an x86 emulator to check my CPU emulation? (ASM, I assume?) I didn't see any, much less a 'standard' set. I assume the various emulator projects have some, but not sure if it's alright to snag them for my own purposes - assuming I can locate them!

Ideally there'd be tests for each of the cpu generations, I assume, and 16 and 32 bit versions. (Yes, yes, and 64 bit, but can't say I'd use them...)

If it doesn't exist, I wonder if it would be usefully enough to start creating? I had a start 10+ years ago when I was working on a Dos emulator, but it was far from complete, very specific, and DosBox's grand success rendered my work happily irrelevant and I moved on to other stuff. I'm curious about 16 bit Win31 stuff and thought about starting a new emulator project for that, but would love to have a set of reference tests to work from if they exist. 😀

Reply 9 of 14, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Thanks for reminding me, I'd forgotten about this thread.

The answer in general is yes, Qemu has one.
http://git.qemu.org/?p=qemu.git;a=tree;f=test … 0754976;hb=HEAD

A MAME/MESS developer teammate of mine had this to say about his 01/18/2012 compiles on 7/5/2012:

Firewave wrote:

I did some new compiles based on the qemu-1.0 test-i386 source with DJGPP. The archive contains a version with all tests enabled (as far as possible on Windows), only 486 ops, only 386 ops and a 386 version without any FPU. The modified sourcefile is also included.

It's not a complete test, but it is quite helpful to test i386-based emulation cores.

Since qemu 1.0, there were minor additions and adjustments. It will build on Linux, but there is no way in the official test to disable feature of smaller CPUs, that's why I did the changes. Also it won't work on Windows and that's the main reason I changed it.

It's possible this situation has changed since July 2012 though, so check the qemu git.

On the other hand, maybe you can collaborate with donkeyulli to create a new one.

Last edited by Stiletto on 2014-08-05, 14:47. Edited 4 times in total.
Reason: fixed previous thread link.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 10 of 14, by Quadko

User metadata
Rank Newbie
Rank
Newbie

Of course. 😀 Thank you very much, good stuff to dive into.

Reply 11 of 14, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

I may pester Firewave, perhaps he's done more recent builds. 😀

(FYI Marvin people: this utility is a bit pointless to run in hardware...)

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 12 of 14, by gamax92

User metadata
Rank Newbie
Rank
Newbie

I apologize for bumping a rather dead thread, but have some questions over this "test" utility

It seems to spew out a bunch of information, but do we have a official reference to what the values should be?
Or should I just go an run it on real hardware and compare the results.

I ask because I ran this on Bochs, QEMU, DOSBox, PCem, and my machine and got some variations, mainly floating point stuff, between all of them (Besides Bochs and My Machine, same results)

Reply 13 of 14, by crazyc

User metadata
Rank Member
Rank
Member
gamax92 wrote:

Or should I just go an run it on real hardware and compare the results.

Yup. You'll even get different results on different CPUs. Examples are flags behavior and SH[RL]D.

Reply 14 of 14, by superfury

User metadata
Rank l33t++
Rank
l33t++

I tried running the attachment by Stiletto on my emulator, UniPCemu. It seems to crash most of the time, due to an IRQ0 firing due to interrupts being available while it's loading the executable? Is that supposed to happen with CWSDPMI?

(sorry if I'm necroposting here, but it's related)

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io