<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 27, 2010, at 12:53 AM, Jean-Paul Kogelman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: Times; "><pre>Hi everyone,</pre><pre>I was looking at the @llvm.memset.* documentation and something seemed a bit off. The <len> argument type seems wrong. It's the same as the <val> type, but it would seem to me that only being able to memset 255 bytes in an i8 array is a bit limiting. :)</pre></span></div></blockquote><div>It is right, the size isn't tied to the value.  The value is always i8, the size can be any integer type:</div><div><a href="http://llvm.org/docs/LangRef.html#int_memset">http://llvm.org/docs/LangRef.html#int_memset</a></div><div><br></div><div>-Chris</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: Times; "><pre><br></pre><pre>declare void @llvm.memset.i8(i8 * <dest>, i8 <val>, i8 <len>, i32 <align>)</pre><pre>declare void @llvm.memset.i16(i8 * <dest>, i8 <val>, i16 <len>, i32 <align>)</pre><pre>declare void @llvm.memset.i32(i8 * <dest>, i8 <val>, i32 <len>, i32 <align>)</pre><pre>declare void @llvm.memset.i64(i8 * <dest>, i8 <val>, i64 <len>, i32 <align>)</pre><pre><br></pre><pre>It takes i32 for <len> just fine btw.</pre><pre><br></pre><pre>Cheers,</pre><pre><br></pre><pre>Jean-Paul Kogelman</pre><pre><br></pre></span></div>_______________________________________________<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></body></html>