[LLVMdev] llvm.memset.p0i8.* intrinsics

16 views
Skip to first unread message

Mario Schwalbe

unread,
Jul 26, 2012, 4:53:46 PM7/26/12
to LLVM Dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

are the llvm.memset.p0i8.i32 and llvm.memset.p0i8.i64 intrinsics meant
to be used for 32-bit and 64-bit architectures, respectively depending
on the module's target datalayout? Or can I use any of them? If yes,
why are there two functions?
Sorry, if it's obvious, but the documentation wasn't that clear.

Thanks and ciao,
Mario
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJQEa5RAAoJEDv0fP6GapNtATkIAKlukyLEomm4ryM5LV8Kb2DA
U0AmW1pCZVS+vMo13AMdEFZ8F0NRxU9ZnhO1TatYTpJpH8bYONr2yCQRypjOGrCC
Hh84aYsQUs1a1+p4P54GyDFD6ZQ/GFUv6DKtHstNxRjozfuwNOcOF/Hoi3L42QzF
ayQ4NCbC67vlmytLxJ+Q9bpHrZ/ba7m8o2MJxYK03Am4Answ7YcKQCIzXBDiQySG
gTV00t88JhOicoWOyJ0L+gW7lYIRGu2GUFN8zb6YwAYnc9bEwfstGxx3QSi5YCgV
iNvlo6C+pD+KROsuSv9AxT5TOXc78EvN1lORqXWehbKsSHeUTE7hqB4Z29P5Ncw=
=OudT
-----END PGP SIGNATURE-----
_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Caldarale, Charles R

unread,
Jul 26, 2012, 5:22:46 PM7/26/12
to Mario Schwalbe, LLVM Dev
> From: llvmdev...@cs.uiuc.edu [mailto:llvmdev...@cs.uiuc.edu]
> On Behalf Of Mario Schwalbe
> Subject: [LLVMdev] llvm.memset.p0i8.* intrinsics

> are the llvm.memset.p0i8.i32 and llvm.memset.p0i8.i64 intrinsics meant
> to be used for 32-bit and 64-bit architectures, respectively

Not necessarily. If you look at the declarations:

declare void @llvm.memset.p0i8.i32(i8* <dest>, i8 <val>,
i32 <len>, i32 <align>, i1 <isvolatile>)
declare void @llvm.memset.p0i8.i64(i8* <dest>, i8 <val>,
i64 <len>, i32 <align>, i1 <isvolatile>)

you'll see that the i32 and i64 refer to the type of the length parameter. You should be able to use either.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Reply all
Reply to author
Forward
0 new messages