Inline assembly doesn't like constant 64bit values... Help?

Inline assembly doesn't like constant 64bit values... Help?

Gilboa Davara gilboad at gmail.com
Fri Feb 4 09:02:11 IST 2011


Hello all,

I'm trying to pass the following command inside GCC inline assembly
block (which targets x86_64 kernel and usermode).

asm volatile
{
	...
	"andq $0x5555555555555555, %%r11 ;"
	...
}

And getting the following error:
'Error: operand type mismatch for `and''

The 32bit version of this code (which uses $0x55555555 constant value)
works just fine.
Shaving ~4 digits off the constant value, seems to working as well. 

So, any idea how I can force-feed 64bit hex values into 64bit inline
assembly?

- Gilboa




More information about the Linux-il mailing list