Re: aarch64 asm operand checking

2015-01-29 Thread Jan Beulich
>>> On 29.01.15 at 09:20, wrote: > On Wed, Jan 28, 2015 at 11:54 PM, Jan Beulich wrote: >> Hello, >> >> in the Xen project we had (meanwhile fixed) code like this (meant to >> be uniform between 32- and 64-bit): >> >> static inline int fls(unsigned int x) { >> int ret; >> asm("clz

Re: aarch64 asm operand checking

2015-01-29 Thread Andrew Pinski
On Wed, Jan 28, 2015 at 11:54 PM, Jan Beulich wrote: > Hello, > > in the Xen project we had (meanwhile fixed) code like this (meant to > be uniform between 32- and 64-bit): > > static inline int fls(unsigned int x) { > int ret; > asm("clz\t%0, %1" : "=r" (ret) : "r" (x)); >

aarch64 asm operand checking

2015-01-28 Thread Jan Beulich
Hello, in the Xen project we had (meanwhile fixed) code like this (meant to be uniform between 32- and 64-bit): static inline int fls(unsigned int x) { int ret; asm("clz\t%0, %1" : "=r" (ret) : "r" (x)); return BITS_PER_LONG - ret; } Being mainly an x86 person, when I fir