From b1656c1e1f7c81a5979ce9e9e2e430399140e4d2 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sun, 22 Mar 2009 11:33:16 +0000 Subject: [PATCH] Add some explanations of how apint loads and stores work. llvm-svn: 67471 --- llvm/docs/LangRef.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index 94f3c3d75a89..cac8fc79dad2 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/docs/LangRef.html @@ -3486,7 +3486,13 @@ alignment may produce less efficient code. An alignment of 1 is always safe.

Semantics:
-

The location of memory pointed to is loaded.

+

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 +i24 reads at most three bytes. When loading a value of a type like +i20 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.

Examples:
  %ptr = alloca i32                               ; yields {i32*}:ptr
   
 
Semantics:

The contents of memory are updated to contain '<value>' -at the location specified by the '<pointer>' operand.

+at the location specified by the '<pointer>' operand. +If '<value>' 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 i24 writes at most +three bytes. When writing a value of a type like i20 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.

Example:
  %ptr = alloca i32                               ; yields {i32*}:ptr
   store i32 3, i32* %ptr                          ; yields {void}