Inline assembly on x64 via a DLL RRS feed

  • Question

  • Today I read on the MSDN website (, that inline assembly is not supported on ARM and x64 processors. Since I'm not good at C, C++ or ASM, I couldn't test it out myself, but it sparked my interest.

    I wondered if it is not possible to do this in Visual Studio, since its on the MSDN website.

    Regardless of the answer to my first question, my second question remains: is it possible to compile a DLL with inline ASM, which is then called via a x64 C/C++ program to execute the inline ASM. If so, why, and if not: why not.

    Thanks in advance!

    Wednesday, March 15, 2017 4:13 PM

All replies

  • I don't have access to a Windows machine at the moment to test but I can tell you that there are other compilers which do not support ARM, ARM thumb, or ARM64 inline assembly due the fact it is a new instruction set and carries with it its own parsing rules. Adding support for inline assembly of new instruction sets may or may not be easy depending on compiler architecture. How you would do so depends on how the compiler is engineered. E.g. if one used the llvm and generated intermediate language as compilation output you would have to turn assembly into intermediate language (going backwards) or use something which would do that for you.

    I gave explanation for ARM above as it is the newest and the architecture I have seen this be the case for in the compilers that I use. The reasoning seems to hold for x64 as the architecture extends the assembly language's grammar quite a bit.

    I happened upon your question but from what I can gather of this forum this is for "System Architecture" in the sense of "System Architect," meaning a systems administrator. It does not seem to be about low level implementation details. To obtain a sure answer you will need to try to use inline assembly yourself.

    Sunday, March 19, 2017 1:46 AM