Can anyone recommend an emulator (ideally open source and available for Debian 9 or RHEL7) which would allow me to run a program as if it is running on a slightly different CPU? I typically use virtual-box for VMs but this does not provide much control over the actual CPU used. Specifically I would like to compare:

  • Intel(R) Xeon(R) CPU E5504 and
  • Intel(R) Core(TM) i5-3470 CPU

Though I can imagine a few other uses for this relating to sandboxes. Ideally I'd like to be able to take a command and just run it under emulation a bit like you do with valgrind but a VM would be okay as well. E.g.

valgrind --tool=memcheck /bin/ls
<magicemu> --cpu XeonE5504 /bin/ls

I imagine I want to use something like Bochs or qemu. Those might be suitable with some guidance or a convenience wrapper of some kind.

In this instance it would be enough to just trap just the floating point operations.


I have an application in which I've observed different behaviour on two different platforms. I've narrowed it down to the point that I think the difference is caused by the floating point implementation in the hardware on two different CPU.

This led me to ask:

The root cause which should be addressed is floating point code which makes no attempt to be portable. This is out of my control but I would like to be able to demonstrate that it is an issue.

1 Answer 1


There's a GUI wrapper for KVM/QEMU called Virt-Manager. It looks like you can select different CPU models to emulate.

  • This looks promising. It doesn't have an option for a Xeon (on my system). Any idea what the nearest hardware from the list would be? Or maybe something known to be old and buggy? Mar 25, 2019 at 18:55
  • @BruceAdams Sorry, not sure. I've only used it for basic VMs.
    – user40623
    Mar 26, 2019 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.