[Lguest] Regarding a small clarification in lg_irq_enable

Jacek Galowicz jacek at galowicz.de
Mon May 6 16:23:48 EST 2013


Hi,

2013/4/16 sebas sujeen <sujeen.vegeta at gmail.com>
>
>  testl $0, lguest_data+LGUEST_DATA_irq_pending
>  jnz send_interrupts
>
> doesn't testl perform a bitwise and of the operands and set the flags
> appropriately. In that case, test with '0' as operand would always set the
> zero flag right?
>

No. The zero flag is set if the whole result is zero.
You should imagine "testl" like a subtraction operator which doesn't write
the result in a register, but changes the state of some flags in the status
register.
So you can see, regarding the overflow and zero flags, if the values you
tested against each other, were bigger/smaller/equal.


> So it can never jump to send_interrupts.
>

This line has been working properly for some years, now. :-)

Best regards,
   Jacek Galowicz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/lguest/attachments/20130506/5eac1b23/attachment.html>


More information about the Lguest mailing list