more edits from Jon Sargeant

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49065 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-04-02 00:38:26 +00:00
parent 1532f3ddd7
commit 4316dec10e

View File

@ -2787,7 +2787,7 @@ address space (address space zero).</p>
bytes of memory from the operating system and returns a pointer of the 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 appropriate type to the program. If "NumElements" is specified, it is the
number of elements allocated, otherwise "NumElements" is defaulted to be one. 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 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.</p> choose to align the allocation on any convenient boundary.</p>
@ -2796,7 +2796,8 @@ choose to align the allocation on any convenient boundary.</p>
<h5>Semantics:</h5> <h5>Semantics:</h5>
<p>Memory is allocated using the system "<tt>malloc</tt>" function, and <p>Memory is allocated using the system "<tt>malloc</tt>" function, and
a pointer is returned.</p> a pointer is returned. Allocating zero bytes is undefined. The result is null
if there is insufficient memory available.</p>
<h5>Example:</h5> <h5>Example:</h5>
@ -2838,7 +2839,8 @@ instruction.</p>
<h5>Semantics:</h5> <h5>Semantics:</h5>
<p>Access to the memory pointed to by the pointer is no longer defined <p>Access to the memory pointed to by the pointer is no longer defined
after this instruction executes.</p> after this instruction executes. If the pointer is null, the result is
undefined.</p>
<h5>Example:</h5> <h5>Example:</h5>
@ -2874,7 +2876,7 @@ space (address space zero).</p>
bytes of memory on the runtime stack, returning a pointer of the bytes of memory on the runtime stack, returning a pointer of the
appropriate type to the program. If "NumElements" is specified, it is the appropriate type to the program. If "NumElements" is specified, it is the
number of elements allocated, otherwise "NumElements" is defaulted to be one. 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 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.</p> can choose to align the allocation on any convenient boundary.</p>
@ -2887,7 +2889,8 @@ memory is automatically released when the function returns. The '<tt>alloca</tt
instruction is commonly used to represent automatic variables that must instruction is commonly used to represent automatic variables that must
have an address available. When the function returns (either with the <tt><a have an address available. When the function returns (either with the <tt><a
href="#i_ret">ret</a></tt> or <tt><a href="#i_unwind">unwind</a></tt> href="#i_ret">ret</a></tt> or <tt><a href="#i_unwind">unwind</a></tt>
instructions), the memory is reclaimed.</p> instructions), the memory is reclaimed. Allocating zero bytes
is legal, but the result is undefined.</p>
<h5>Example:</h5> <h5>Example:</h5>
@ -2916,7 +2919,7 @@ the number or order of execution of this <tt>load</tt> with other
volatile <tt>load</tt> and <tt><a href="#i_store">store</a></tt> volatile <tt>load</tt> and <tt><a href="#i_store">store</a></tt>
instructions. </p> instructions. </p>
<p> <p>
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 (that is, the alignment of the memory address). A value of 0 or an
omitted "align" argument means that the operation has the preferential omitted "align" argument means that the operation has the preferential
alignment for the target. It is the responsibility of the code emitter alignment for the target. It is the responsibility of the code emitter
@ -2947,13 +2950,14 @@ Instruction</a> </div>
<h5>Arguments:</h5> <h5>Arguments:</h5>
<p>There are two arguments to the '<tt>store</tt>' instruction: a value <p>There are two arguments to the '<tt>store</tt>' instruction: a value
to store and an address at which to store it. The type of the '<tt>&lt;pointer&gt;</tt>' to store and an address at which to store it. The type of the '<tt>&lt;pointer&gt;</tt>'
operand must be a pointer to the type of the '<tt>&lt;value&gt;</tt>' operand must be a pointer to the <a href="#t_firstclass">first class</a> type
of the '<tt>&lt;value&gt;</tt>'
operand. If the <tt>store</tt> is marked as <tt>volatile</tt>, then the operand. If the <tt>store</tt> is marked as <tt>volatile</tt>, then the
optimizer is not allowed to modify the number or order of execution of optimizer is not allowed to modify the number or order of execution of
this <tt>store</tt> with other volatile <tt>load</tt> and <tt><a this <tt>store</tt> with other volatile <tt>load</tt> and <tt><a
href="#i_store">store</a></tt> instructions.</p> href="#i_store">store</a></tt> instructions.</p>
<p> <p>
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 (that is, the alignment of the memory address). A value of 0 or an
omitted "align" argument means that the operation has the preferential omitted "align" argument means that the operation has the preferential
alignment for the target. It is the responsibility of the code emitter 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. <a href="#t_pointer">Pointer</a> on the pointer type that is being indexed into. <a href="#t_pointer">Pointer</a>
and <a href="#t_array">array</a> types can use a 32-bit or 64-bit and <a href="#t_array">array</a> types can use a 32-bit or 64-bit
<a href="#t_integer">integer</a> type but the value will always be sign extended <a href="#t_integer">integer</a> type but the value will always be sign extended
to 64-bits. <a href="#t_struct">Structure</a> types require <tt>i32</tt> to 64-bits. <a href="#t_struct">Structure</a> and <a href="#t_pstruct">packed
<b>constants</b>.</p> structure</a> types require <tt>i32</tt> <b>constants</b>.</p>
<p>In the example above, the first index is indexing into the '<tt>%ST*</tt>' <p>In the example above, the first index is indexing into the '<tt>%ST*</tt>'
type, which is a pointer, yielding a '<tt>%ST</tt>' = '<tt>{ i32, double, %RT type, which is a pointer, yielding a '<tt>%ST</tt>' = '<tt>{ i32, double, %RT
@ -3552,7 +3556,7 @@ instructions, which defy better classification.</p>
</pre> </pre>
<h5>Overview:</h5> <h5>Overview:</h5>
<p>The '<tt>icmp</tt>' instruction returns a boolean value based on comparison <p>The '<tt>icmp</tt>' instruction returns a boolean value based on comparison
of its two integer operands.</p> of its two integer or pointer operands.</p>
<h5>Arguments:</h5> <h5>Arguments:</h5>
<p>The '<tt>icmp</tt>' instruction takes three operands. The first operand is <p>The '<tt>icmp</tt>' instruction takes three operands. The first operand is
the condition code indicating the kind of comparison to perform. It is not the condition code indicating the kind of comparison to perform. It is not
@ -3918,7 +3922,7 @@ results.</p>
<p>The '<tt>getresult</tt>' instruction takes a call or invoke value as its <p>The '<tt>getresult</tt>' instruction takes a call or invoke value as its
first argument. The value must have <a href="#t_struct">structure type</a>. first argument. The value must have <a href="#t_struct">structure type</a>.
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.</p> the number of values returned by the call.</p>
<h5>Semantics:</h5> <h5>Semantics:</h5>