<div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 7:38 PM, Jun Koi <span dir="ltr"><<a href="mailto:junkoi2004@gmail.com" target="_blank">junkoi2004@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Wed, Apr 2, 2014 at 8:22 AM, Craig Topper <span dir="ltr"><<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I looked at this briefly, I think it causes some mistakes that get reversed later in fixupReg. </div>


</blockquote><div><br></div></div><div>so this is indeed a bug, right?<br></div></div></div></div></blockquote><div><br></div><div>I can't prove that it causes any bad behavior. Can you?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br> <br></div><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
The disassembler design is a bit of a mess with regards to prefixes and operand size.</div>

</blockquote><div><br></div></div><div>do you mean the bug related to "0x66 0xf2" sequence? any hope to get it fixed?<br></div></div></div></div></blockquote><div><br></div><div>It's a pretty fundamental flaw in the disassembler's design. The "repne" when it gets printed is treated as an instruction itself by the assembly printer and everything else. With the current design, there's really no way to get that to emit and to get the 0x66 to bind to the "scas". I would like to fix it, but I'll need to devote some time to do it that I don't have right now.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br><br></div><div>thanks,<br></div><div>
Jun<br><br><br><br><br><br><br><br><br> </div><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="gmail_extra">
<br><br><div class="gmail_quote"><div><div>On Tue, Apr 1, 2014 at 4:43 PM, Jun Koi <span dir="ltr"><<a href="mailto:junkoi2004@gmail.com" target="_blank">junkoi2004@gmail.com</a>></span> wrote:<br></div>

</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Mon, Mar 31, 2014 at 11:48 PM, Jun Koi <span dir="ltr"><<a href="mailto:junkoi2004@gmail.com" target="_blank">junkoi2004@gmail.com</a>></span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br>In file X86DisassemblerDecoder.c, we have function readPrefixes() with below code:<br>





<br>.....<br>  } else if (insn->mode == MODE_32BIT) {<br>    insn->registerSize       = (hasOpSize ? 2 : 4);<br>
    insn->addressSize        = (hasAdSize ? 2 : 4);<br>    insn->displacementSize   = (hasAdSize ? 2 : 4);<br>    insn->immediateSize      = (hasOpSize ? 2 : 4);<br>  } <br>....<br><br></div>This is confused to me: so we have registerSize to be either 2 or 4 bytes.<br>






</div>But we might have instruction like:<br><br>     adc    al, 0x89<br><div><div><br></div><div>This case we should have registerSize = 1 for AL. So is this a bug, or I am misunderstanding the meaning of this "registerSize" ??<br>






<br></div></div></div></blockquote><div><br></div></div></div><div>any help please?<br><br>thanks.<br></div></div></div></div>
<br></div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>~Craig
</font></span></div>
</blockquote></div></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>~Craig
</div></div>