aboutsummaryrefslogtreecommitdiffstats
path: root/docs/LangRef.html
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-03-22 11:33:16 +0000
committerDuncan Sands <baldrick@free.fr>2009-03-22 11:33:16 +0000
commit19527c6ef371c6a09743bf91d4bee36b32241b12 (patch)
treed3c1b2396d2767357a601caddd5b897e6ea1ce2e /docs/LangRef.html
parentad20d3825ea2ce02e502901679a1305158b6d7b2 (diff)
downloadexternal_llvm-19527c6ef371c6a09743bf91d4bee36b32241b12.zip
external_llvm-19527c6ef371c6a09743bf91d4bee36b32241b12.tar.gz
external_llvm-19527c6ef371c6a09743bf91d4bee36b32241b12.tar.bz2
Add some explanations of how apint loads and stores
work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r--docs/LangRef.html17
1 files changed, 15 insertions, 2 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 94f3c3d..cac8fc7 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -3486,7 +3486,13 @@ alignment may produce less efficient code. An alignment of 1 is always
safe.
</p>
<h5>Semantics:</h5>
-<p>The location of memory pointed to is loaded.</p>
+<p>The location of memory pointed to is loaded. If the value being loaded
+is of scalar type then the number of bytes read does not exceed the minimum
+number of bytes needed to hold all bits of the type. For example, loading an
+<tt>i24</tt> reads at most three bytes. When loading a value of a type like
+<tt>i20</tt> with a size that is not an integral number of bytes, the result
+is undefined if the value was not originally written using a store of the
+same type.</p>
<h5>Examples:</h5>
<pre> %ptr = <a href="#i_alloca">alloca</a> i32 <i>; yields {i32*}:ptr</i>
<a
@@ -3525,7 +3531,14 @@ safe.
</p>
<h5>Semantics:</h5>
<p>The contents of memory are updated to contain '<tt>&lt;value&gt;</tt>'
-at the location specified by the '<tt>&lt;pointer&gt;</tt>' operand.</p>
+at the location specified by the '<tt>&lt;pointer&gt;</tt>' operand.
+If '<tt>&lt;value&gt;</tt>' is of scalar type then the number of bytes
+written does not exceed the minimum number of bytes needed to hold all
+bits of the type. For example, storing an <tt>i24</tt> writes at most
+three bytes. When writing a value of a type like <tt>i20</tt> with a
+size that is not an integral number of bytes, it is unspecified what
+happens to the extra bits that do not belong to the type, but they will
+typically be overwritten.</p>
<h5>Example:</h5>
<pre> %ptr = <a href="#i_alloca">alloca</a> i32 <i>; yields {i32*}:ptr</i>
store i32 3, i32* %ptr <i>; yields {void}</i>