Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
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".
But the outl instruction only refers 32bit register.
I can modify "outl %0,%w1" to "outl %%eax,%w1".
But I hope use other way to fix it, just like %0 to use the input parameters.
Thanks
OUTs (and INs) only works with al/ax/eax and dx/constant as its operands. Having GCC choose the registers will only give you trouble since instead of the few options that are actually legal, it may choose practically everything.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]