1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include <stdio.h> #if !defined(NDEBUG) #define TRACE(MSG) \ fprintf(stderr, "%s\n", #MSG) #else #define TRACE(MSG) #endif int main(int argc, char *argv[]) { TRACE(pre assembly); __asm__("imul %%eax, %%eax" : : : ); TRACE(post assembly); return 0; } /* https://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html */