From 4316dec10e7cbe3b283f6ece1fb3d0881938c843 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 2 Apr 2008 00:38:26 +0000 Subject: [PATCH] more edits from Jon Sargeant git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49065 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 4838c7a937c..09903f1016b 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -2787,7 +2787,7 @@ address space (address space zero).

bytes of memory from the operating system and returns a pointer of the appropriate type to the program. If "NumElements" is specified, it is the number of elements allocated, otherwise "NumElements" is defaulted to be one. -If an alignment is specified, the value result of the allocation is guaranteed to +If a constant alignment is specified, the value result of the allocation is guaranteed to be aligned to at least that boundary. If not specified, or if zero, the target can choose to align the allocation on any convenient boundary.

@@ -2796,7 +2796,8 @@ choose to align the allocation on any convenient boundary.

Semantics:

Memory is allocated using the system "malloc" function, and -a pointer is returned.

+a pointer is returned. Allocating zero bytes is undefined. The result is null +if there is insufficient memory available.

Example:
@@ -2838,7 +2839,8 @@ instruction.

Semantics:

Access to the memory pointed to by the pointer is no longer defined -after this instruction executes.

+after this instruction executes. If the pointer is null, the result is +undefined.

Example:
@@ -2874,7 +2876,7 @@ space (address space zero).

bytes of memory on the runtime stack, returning a pointer of the appropriate type to the program. If "NumElements" is specified, it is the number of elements allocated, otherwise "NumElements" is defaulted to be one. -If an alignment is specified, the value result of the allocation is guaranteed +If a constant alignment is specified, the value result of the allocation is guaranteed to be aligned to at least that boundary. If not specified, or if zero, the target can choose to align the allocation on any convenient boundary.

@@ -2887,7 +2889,8 @@ memory is automatically released when the function returns. The 'allocaret or unwind -instructions), the memory is reclaimed.

+instructions), the memory is reclaimed. Allocating zero bytes +is legal, but the result is undefined.

Example:
@@ -2916,7 +2919,7 @@ the number or order of execution of this load with other volatile load and store instructions.

-The optional "align" argument specifies the alignment of the operation +The optional constant "align" argument specifies the alignment of the operation (that is, the alignment of the memory address). A value of 0 or an omitted "align" argument means that the operation has the preferential alignment for the target. It is the responsibility of the code emitter @@ -2947,13 +2950,14 @@ Instruction

Arguments:

There are two arguments to the 'store' instruction: a value to store and an address at which to store it. The type of the '<pointer>' -operand must be a pointer to the type of the '<value>' +operand must be a pointer to the first class type +of the '<value>' operand. If the store is marked as volatile, then the optimizer is not allowed to modify the number or order of execution of this store with other volatile load and store instructions.

-The optional "align" argument specifies the alignment of the operation +The optional constant "align" argument specifies the alignment of the operation (that is, the alignment of the memory address). A value of 0 or an omitted "align" argument means that the operation has the preferential alignment for the target. It is the responsibility of the code emitter @@ -3043,8 +3047,8 @@ entry: on the pointer type that is being indexed into. Pointer and array types can use a 32-bit or 64-bit integer type but the value will always be sign extended -to 64-bits. Structure types require i32 -constants.

+to 64-bits. Structure and packed +structure types require i32 constants.

In the example above, the first index is indexing into the '%ST*' type, which is a pointer, yielding a '%ST' = '{ i32, double, %RT @@ -3552,7 +3556,7 @@ instructions, which defy better classification.

Overview:

The 'icmp' instruction returns a boolean value based on comparison -of its two integer operands.

+of its two integer or pointer operands.

Arguments:

The 'icmp' instruction takes three operands. The first operand is the condition code indicating the kind of comparison to perform. It is not @@ -3918,7 +3922,7 @@ results.

The 'getresult' instruction takes a call or invoke value as its first argument. The value must have structure type. -The second argument is an unsigned index value which must be in range for +The second argument is a constant unsigned index value which must be in range for the number of values returned by the call.

Semantics: