<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div><div>On Dec 22, 2010, at 8:31 AM, Olivier Meurant wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">There is a problem on X86 disassembler for instructions beginning with x86 prefix :<br><br>$ echo "0x66 0x0f 0x6f 0x8f 0x00 0x00 0x00 0x00" | llvm-mc --disassemble<br> movdqa (%edi), %xmm1<br><br>$ echo "0x53 0x66 0x0f 0x6f 0x8f 0x00 0x00 0x00 0x00" | llvm-mc --disassemble<br>
pushl %ebx<br><stdin>:1:6: warning: invalid instruction encoding<br>0x53 0x66 0x0f 0x6f 0x8f 0x00 0x00 0x00 0x00<br> ^<br><br><br>I attach a patch, but I'm not really familiar with this code, so if someone can review/correct, it would be great.<br>
<br>The problem is between readPrefixes and getId : prefixLocation depends on buffer position, but necessaryPrefixLocation is never updated to match buffer position.<br><br>Cheers,<br>Olivier.<br><br><br>
<span><x86_disassembler_66_prefix.patch></span>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></div></body></html>