x86-asm: Accept 'q' modifier
In inline extended asm '%q1' refers to the 64bit register of operand 1.
This commit is contained in:
@ -2584,6 +2584,17 @@ unsigned long mconstraint_test(struct struct1231 *r)
|
||||
: "=&r" (ret), "=m" (a)
|
||||
: "m" (*(struct struct123 *)r->addr));
|
||||
return ret + a[0];
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
int fls64(unsigned long long x)
|
||||
{
|
||||
int bitpos = -1;
|
||||
asm("bsrq %1,%q0"
|
||||
: "+r" (bitpos)
|
||||
: "rm" (x));
|
||||
return bitpos + 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned int set;
|
||||
|
||||
Reference in New Issue
Block a user