Ad
  • Default User Avatar

    I use the __asm__("\n\t movq %%register_name,%0" : "=r"(i)); for reading register's value into long long i. It works fine for %rdi, %rsi and stack, but it doesn't work for %rdx, %rcx, %r8 and %r9 - it returns garbage values. Can anybody give me a hint what's wrong?