[cfe-dev] error: invalid operand for instruction (inl)

John Calcote john.calcote at gmail.com
Wed Nov 13 08:57:00 PST 2013


Thank you Joerg! That was it. I had tried "inl (%%dx), (%%eax)" because the
original code had parentheses around the operands. Not sure where those came
from. I removed them and it worked. 

Thanks again,
John

> -----Original Message-----
> From: cfe-dev-bounces at cs.uiuc.edu [mailto:cfe-dev-bounces at cs.uiuc.edu]
> On Behalf Of Joerg Sonnenberger
> Sent: Wednesday, November 13, 2013 6:58 AM
> To: cfe-dev at cs.uiuc.edu
> Subject: Re: [cfe-dev] error: invalid operand for instruction (inl)
> 
> On Wed, Nov 13, 2013 at 01:52:40AM +0000, John Calcote wrote:
> > static void vmw_backdoor(unsigned cmd, registers* regs) {
> >     __asm__ __volatile__(
> >         "inl (%%dx)"
> >         : "=a" (regs->eax), "=c" (regs->ecx), "=d" (regs->edx), "=b"
(regs->ebx)
> >         : "0" (VMW_MAGIC), "1" (cmd), "2" (VMW_CMD_IOPORT), "3"
> (MAX_UINT32)
> >         : "memory");
> > }
> 
> It should be "inl %%dx, %%eax".
> 
> Joerg
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list