Search code examples
cgccassemblyvisual-c++inline-assembly

What is the difference between 'asm', '__asm' and '__asm__'?


As far as I can tell, the only difference between __asm { ... }; and __asm__("..."); is that the first uses mov eax, var and the second uses movl %0, %%eax with :"=r" (var) at the end. What other differences are there? And what about just asm?


Solution

  • Which one you use depends on your compiler. This isn't standard like the C language.