<div dir="ltr">The ISA doesn't actually have a 32-bit mov instruction of this form (though all the processors I've seen accept the bytes pattern associated with the 32-bit variant). I doubt that anyone dealing with explicit segment twiddling ever wants the effectless prefix added. AFAIK these instructions are only ever emitted via explicit assembly so they it would be easy enough to add the byte via an explicit ".byte" directive. <div><div><br></div><div><div><div>Ideally we'd only have the 16-bit mov instruction which accepts but ignores the OpSize prefix, but we need to accept the text syntax "mov %eax, %fs" to handle what objdump dumps, hence this workaround. </div><div><br></div><div>-Nirav</div><div><div><br></div><div><br><div><div><br></div><div><br><div><br></div><div><br><div><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 1:25 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">rnk added a comment.<br>
<br>
I dono, if someone really writes `movl %eax, %cs` I would assume they really want the prefix, right? Obviously gas does something else, but that's surprising to me.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D23166" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D23166</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>