[LLVMdev] Inline Asm Question

Bill Wendling isanbard at gmail.com
Sat Jan 6 23:06:53 CST 2007

Hi all,

I couldn't find any documentation on this, but was wondering if  
people here knew what this inline asm means:

         unsigned __ctz_x = val;
         unsigned __ctz_c;

         __asm__ ("{cntlz|cntlzw} %0,%1"
                 : "=r" (__ctz_c)
                 : "r" (__ctz_x & -__ctz_x));

I'm assuming that "{cntlz|cntlzw}" indicates that one or the other of  
these asm mnemonics are used. But how does this get decided?


More information about the LLVMdev mailing list