Newer
Older
Chris Lattner
committed
The first argument is a pointer to the destination, the second is a pointer to
the source. The third argument is an (arbitrarily sized) integer argument
specifying the number of bytes to copy, and the fourth argument is the alignment
of the source and destination locations.
</p>
Chris Lattner
committed
<p>
If the call to this intrinisic has an alignment value that is not 0 or 1, then
the caller guarantees that the size of the copy is a multiple of the alignment
and that both the source and destination pointers are aligned to that boundary.
</p>
Chris Lattner
committed
<h5>Semantics:</h5>
<p>
The '<tt>llvm.memcpy</tt>' intrinsic copies a block of memory from the source
location to the destination location, which are not allowed to overlap. It
copies "len" bytes of memory over. If the argument is known to be aligned to
some boundary, this can be specified as the fourth argument, otherwise it should
be set to 0 or 1.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_memmove">'<tt>llvm.memmove</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void %llvm.memmove(sbyte* <dest>, sbyte* <src>,
uint <len>, uint <align>)
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
</pre>
<h5>Overview:</h5>
<p>
The '<tt>llvm.memmove</tt>' intrinsic moves a block of memory from the source
location to the destination location. It is similar to the '<tt>llvm.memcpy</tt>'
intrinsic but allows the two memory locations to overlap.
</p>
<p>
Note that, unlike the standard libc function, the <tt>llvm.memmove</tt> intrinsic
does not return a value, and takes an extra alignment argument.
</p>
<h5>Arguments:</h5>
<p>
The first argument is a pointer to the destination, the second is a pointer to
the source. The third argument is an (arbitrarily sized) integer argument
specifying the number of bytes to copy, and the fourth argument is the alignment
of the source and destination locations.
</p>
Chris Lattner
committed
<p>
If the call to this intrinisic has an alignment value that is not 0 or 1, then
the caller guarantees that the size of the copy is a multiple of the alignment
and that both the source and destination pointers are aligned to that boundary.
</p>
<h5>Semantics:</h5>
<p>
The '<tt>llvm.memmove</tt>' intrinsic copies a block of memory from the source
location to the destination location, which may overlap. It
copies "len" bytes of memory over. If the argument is known to be aligned to
some boundary, this can be specified as the fourth argument, otherwise it should
be set to 0 or 1.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_memset">'<tt>llvm.memset</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void %llvm.memset(sbyte* <dest>, ubyte <val>,
uint <len>, uint <align>)
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
</pre>
<h5>Overview:</h5>
<p>
The '<tt>llvm.memset</tt>' intrinsic fills a block of memory with a particular
byte value.
</p>
<p>
Note that, unlike the standard libc function, the <tt>llvm.memset</tt> intrinsic
does not return a value, and takes an extra alignment argument.
</p>
<h5>Arguments:</h5>
<p>
The first argument is a pointer to the destination to fill, the second is the
byte value to fill it with, the third argument is an (arbitrarily sized) integer
argument specifying the number of bytes to fill, and the fourth argument is the
known alignment of destination location.
</p>
<p>
If the call to this intrinisic has an alignment value that is not 0 or 1, then
the caller guarantees that the size of the copy is a multiple of the alignment
and that the destination pointer is aligned to that boundary.
</p>
<h5>Semantics:</h5>
<p>
The '<tt>llvm.memset</tt>' intrinsic fills "len" bytes of memory starting at the
destination location. If the argument is known to be aligned to some boundary,
this can be specified as the fourth argument, otherwise it should be set to 0 or
1.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_isunordered">'<tt>llvm.isunordered</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare bool %llvm.isunordered(<float or double> Val1, <float or double> Val2)
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
</pre>
<h5>Overview:</h5>
<p>
The '<tt>llvm.isunordered</tt>' intrinsic returns true if either or both of the
specified floating point values is a NAN.
</p>
<h5>Arguments:</h5>
<p>
The arguments are floating point numbers of the same type.
</p>
<h5>Semantics:</h5>
<p>
If either or both of the arguments is a SNAN or QNAN, it returns true, otherwise
false.
</p>
</div>
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_count">Bit Counting Intrinsics</a>
</div>
<div class="doc_text">
<p>
LLVM provides intrinsics for a few important bit counting operations.
These allow efficient code generation for some algorithms.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_ctpop">'<tt>llvm.ctpop</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare int %llvm.ctpop(int <src>)
</pre>
<h5>Overview:</h5>
<p>
The '<tt>llvm.ctpop</tt>' intrinsic counts the number of ones in a variable.
</p>
<h5>Arguments:</h5>
<p>
The only argument is the value to be counted. The argument may be of any integer type.
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
</p>
<h5>Semantics:</h5>
<p>
The '<tt>llvm.ctpop</tt>' intrinsic counts the 1's in a variable.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_cttz">'<tt>llvm.cttz</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare int %llvm.cttz(int <src>)
</pre>
<h5>Overview:</h5>
<p>
The '<tt>llvm.cttz</tt>' intrinsic counts the number of trailing zeros.
</p>
<h5>Arguments:</h5>
<p>
The only argument is the value to be counted. The argument may be of any integer type.
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
</p>
<h5>Semantics:</h5>
<p>
The '<tt>llvm.cttz</tt>' intrinsic counts the trailing zeros in a variable. If the src == 0
then the result is the size in bits of the type of src.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_ctlz">'<tt>llvm.ctlz</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare int %llvm.ctlz(int <src>)
</pre>
<h5>Overview:</h5>
<p>
The '<tt>llvm.ctlz</tt>' intrinsic counts the number of leading zeros in a variable.
</p>
<h5>Arguments:</h5>
<p>
The only argument is the value to be counted. The argument may be of any integer type.
</p>
<h5>Semantics:</h5>
<p>
The '<tt>llvm.ctlz</tt>' intrinsic counts the leading zeros in a variable. If the src == 0
then the result is the size in bits of the type of src.
</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_debugger">Debugger Intrinsics</a>
</div>
<div class="doc_text">
<p>
The LLVM debugger intrinsics (which all start with <tt>llvm.dbg.</tt> prefix),
are described in the <a
href="SourceLevelDebugging.html#format_common_intrinsics">LLVM Source Level
Debugging</a> document.
</p>
</div>
<!-- *********************************************************************** -->
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a><br>
Last modified: $Date$
</address>
</body>
</html>