Tag: inline-assembly
-
Is clang generating incorrect code for inline assembly?
9 I have some C code: #include "stdio.h" typedef struct num { unsigned long long x; } num; int main(int argc, char **argv) { struct num anum; anum.x = 0; __asm__("movq %%rax, %0n" : "=m" (anum.x) : "rax"(2)); printf("%llun",anum.x); } which I’m compiling and running on my (intel) Mac laptop. The output from the code…