qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: i386 emulation bug: mov reg, [addr]


From: Paolo Bonzini
Subject: [Qemu-devel] Re: i386 emulation bug: mov reg, [addr]
Date: Wed, 16 Dec 2009 00:37:37 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Lightning/1.0pre Thunderbird/3.0b4

On 12/15/2009 10:26 PM, Jamie Lokier wrote:
But that said, I'm not sure if this line from earlier breaks the test:

             index = ((code>>  3)&  7) | REX_X(s);

When is REX_X(s) not zero, and does it break the index != 4 test?

When %r12 (4+8=12) is used as an index. That's a valid statement, so it's okay to test index != 4 (when REX_X(s) is not zero it is always eight, and you'd get index == 12):

   0:   8b 04 65 11 22 33 44            mov    0x44332211(,%riz,2),%eax
   7:   42 8b 04 65 11 22 33 44         mov    0x44332211(,%r12,2),%eax

(BTW %eiz/%riz are not accepted by my GAS, only produced by the disassembler).

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]