<div dir="ltr">I agree. I've wanted to start looking into this, but it gets into a little trouble because the gnu assember throws a truncation warning instead of an error on some cases. We don't have a great way to handle that in the MC assembler framework.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 13, 2015 at 11:58 PM, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank">joerg@britannica.bec.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jan 14, 2015 at 05:10:21AM -0000, Saleem Abdulrasool wrote:<br>
> Author: compnerd<br>
> Date: Tue Jan 13 23:10:21 2015<br>
> New Revision: 225941<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=225941&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=225941&view=rev</a><br>
> Log:<br>
> X86: validate 'int' instruction<br>
><br>
> The int instruction takes as an operand an 8-bit immediate value.  Validate that<br>
> the input is valid rather than silently truncating the value.<br>
<br>
I think this is the wrong approach. We don't want to handle every case<br>
of i8imm specially, but should check the immediates in one place. The<br>
problem occurs with pretty much any instruction that has immediates.<br>
<br>
Joerg<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>