[LLVMdev] @llvm.memset.* documentation

Chris Lattner clattner at apple.com
Sat Feb 27 09:51:10 PST 2010


On Feb 27, 2010, at 12:53 AM, Jean-Paul Kogelman wrote:

> Hi everyone,
> 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. :)
It is right, the size isn't tied to the value.  The value is always i8, the size can be any integer type:
http://llvm.org/docs/LangRef.html#int_memset

-Chris

> 
> declare void @llvm.memset.i8(i8 * <dest>, i8 <val>, i8 <len>, i32 <align>)
> declare void @llvm.memset.i16(i8 * <dest>, i8 <val>, i16 <len>, i32 <align>)
> declare void @llvm.memset.i32(i8 * <dest>, i8 <val>, i32 <len>, i32 <align>)
> declare void @llvm.memset.i64(i8 * <dest>, i8 <val>, i64 <len>, i32 <align>)
> 
> It takes i32 for <len> just fine btw.
> 
> Cheers,
> 
> Jean-Paul Kogelman
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100227/89771fd6/attachment.html>


More information about the llvm-dev mailing list