4

I want to test how some code with hand written intrinsics will behave on platforms with different available instruction sets. By "behave" I mostly mean choose the right code path and not crash.

How can I do this without buying a bunch of machines? Do any of the virtual machine packages support this?

Praxeolitic
  • 22,455
  • 16
  • 75
  • 126
  • 6
    For Intel processors, you can use their SDE. (https://software.intel.com/en-us/articles/intel-software-development-emulator) It's not perfect and it's a bit buggy for older processors. But it works. Admittedly, it's mainly for emulating unreleased instruction sets. – Mysticial Sep 05 '15 at 03:18
  • @Mysticial: To be honest, I think it would be great to have a small C++ library, which implements all the original intrinsics without x86-specific code. Maybe emulating new instructions with older sets could also be nice. Preferrably with permissive license =) I cannot find anything like this... – stgatilov Sep 12 '15 at 12:04
  • @stgatilov I did that with a subset of AVX512. Unfortunately, it isn't as straightforward as it sounds. For larger projects that use a lot of intrinsics, it's very easy to exceed the compiler's "complexity" limit or to completely blow the stack due to register spilling of hundreds of (emulated) vector registers. – Mysticial Sep 12 '15 at 17:12
  • Possible duplicate of [developing for new instruction sets](https://stackoverflow.com/questions/458869/developing-for-new-instruction-sets) – phuclv Oct 17 '18 at 16:05
  • [Intel AVX2 Assembly Development](https://stackoverflow.com/q/22626039/995714) – phuclv Oct 17 '18 at 16:06

0 Answers0