Is there a good IDE out there to help with writing raw SSE/AVX assembly? In my head I'm thinking something at least that would show the register bank, and maybe let me set the registers to hold floats/shorts/etc, and as I step through the code, I can see how each instruction affects the register file to keep track of permutations and things. Does anything like that exist?
Asked
Active
Viewed 248 times
2
-
2This will probably get closed as a recommendation question, but FWIW I use Xcode on the Mac for most of my (cross-platform) SIMD code development. If you use suitable types for your vectors then you get fairly nice SIMD variable views in the debugger. I work mainly in C/C++ with intrinsics though - not sure why you'd want to write raw assembler but hey, it's your funeral! ;-) – Paul R Jan 10 '18 at 16:19
-
1I'm mostly interested in operations on arrays of complex data, so I can just write the loop in assembly, and inline it in a header file. No need to separately compile for each simd architecture and link it in, and it works with gcc/clang/intel (I don't do MS). – gct Jan 10 '18 at 16:31
-
1I'm not aware of any very good debugger for SIMD asm. Design your code carefully, with design notes to keep track of which values are being shuffled where. e.g. see https://stackoverflow.com/questions/36932240/avx2-what-is-the-most-efficient-way-to-pack-left-based-on-a-mask for an example of some design notes. In C++ source, you can sometimes name your variables well enough, like [`vuya` for pixel data in that order](https://stackoverflow.com/questions/48151874/deinterleave-and-convert-float-to-uint16-t-efficiently), or `vvuuyyaa01` after packing + shuffling vectors together. – Peter Cordes Jan 10 '18 at 16:31
-
1https://gcc.gnu.org/wiki/DontUseInlineAsm. Using Intel intrinsics isn't going to make it much / any easier to port to SSE code to AVX or AVX512, because the way Intel does it requires changing every line anyway for wider vectors. But there are wrapper libs like VCL (http://agner.org/optimize/). But there are other advantages, like having the compiler save you from yourself by avoiding microarchitectural pitfalls on Bulldozer vs. Haswell or whatever, and / or unrolling for you. Or more importantly, taking advantage of constant propagation if any params are compile-time constants. – Peter Cordes Jan 10 '18 at 16:37
-
2If you have windows, Visual Studio (express version is free, you can still get VS2015 express), can do source level debugging for assembly code and includes the option of showing the xmm and ymm registers in a debug window as you step through the code. – rcgldr Jan 10 '18 at 21:22