Re: Inline assembly constraints for a specific register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avi Kivity writes:
 > How can I specify a constraint for a specific register, for example r8 
 > on x86_64?
 > 
 > I can specify any of rax, rbx, rcx, and rdx using a,b, c, and d.  But 
 > what about the rest of the register file?

Like this:

int poo (int N)
{
  register int zz __asm__ ("r8") = N;
  
  __asm__ ("mov %0, %0" : "+r"(zz));
  
  return zz;
}

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux