Page 1 of 1

Help 64bit:The AT&T style assembler, inl&outl instru

Posted: Thu Feb 14, 2008 2:59 am
by rjying
In the 64bit mode, The inl & outl instructions will be expanded 64bit input and
output operate.
What instructions to be used 32bit input and output operate?

Does inb&outb always 8 bit input&output operate?
Does inw&outw always 16bit input&output operate?
Thanks

Posted: Thu Feb 14, 2008 3:36 am
by AJ
Hi,

In long mode, you do not get additional 64 bit inputs and outputs - inputs are zero extended to 64 bits and outputs ignore the higher 64 bits of a 64 bit register.

Cheers,
Adam

Posted: Sun Feb 17, 2008 9:20 pm
by rjying
Thank you very much.
I wrote the inline assembler in the C code:
void outl(unsigned short port,unsigned long vaule)
{
__asm__ __volatile__ ( "outl %0,%w1" ::"a"(vaule),"d"(port));
}
But issue error when it's compiled.
that prompted, %0 refers "rax".

Thanks.