llvm.org GIT mirror llvm / 4316dec
more edits from Jon Sargeant git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49065 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
1 changed file(s) with 16 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
27862786 bytes of memory from the operating system and returns a pointer of the
27872787 appropriate type to the program. If "NumElements" is specified, it is the
27882788 number of elements allocated, otherwise "NumElements" is defaulted to be one.
2789 If an alignment is specified, the value result of the allocation is guaranteed to
2789 If a constant alignment is specified, the value result of the allocation is guaranteed to
27902790 be aligned to at least that boundary. If not specified, or if zero, the target can
27912791 choose to align the allocation on any convenient boundary.

27922792
27952795
Semantics:
27962796
27972797

Memory is allocated using the system "malloc" function, and

2798 a pointer is returned.

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

27992800
28002801
Example:
28012802
28372838
Semantics:
28382839
28392840

Access to the memory pointed to by the pointer is no longer defined

2840 after this instruction executes.

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

28412843
28422844
Example:
28432845
28732875 bytes of memory on the runtime stack, returning a pointer of the
28742876 appropriate type to the program. If "NumElements" is specified, it is the
28752877 number of elements allocated, otherwise "NumElements" is defaulted to be one.
2876 If an alignment is specified, the value result of the allocation is guaranteed
2878 If a constant alignment is specified, the value result of the allocation is guaranteed
28772879 to be aligned to at least that boundary. If not specified, or if zero, the target
28782880 can choose to align the allocation on any convenient boundary.

28792881
28862888 instruction is commonly used to represent automatic variables that must
28872889 have an address available. When the function returns (either with the
28882890 href="#i_ret">ret or unwind
2889 instructions), the memory is reclaimed.

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

28902893
28912894
Example:
28922895
29152918 volatile load and store
29162919 instructions.

29172920

2918 The optional "align" argument specifies the alignment of the operation
2921 The optional constant "align" argument specifies the alignment of the operation
29192922 (that is, the alignment of the memory address). A value of 0 or an
29202923 omitted "align" argument means that the operation has the preferential
29212924 alignment for the target. It is the responsibility of the code emitter
29462949
Arguments:
29472950

There are two arguments to the 'store' instruction: a value

29482951 to store and an address at which to store it. The type of the '<pointer>'
2949 operand must be a pointer to the type of the '<value>'
2952 operand must be a pointer to the first class type
2953 of the '<value>'
29502954 operand. If the store is marked as volatile, then the
29512955 optimizer is not allowed to modify the number or order of execution of
29522956 this store with other volatile load and
29532957 href="#i_store">store instructions.

29542958

2955 The optional "align" argument specifies the alignment of the operation
2959 The optional constant "align" argument specifies the alignment of the operation
29562960 (that is, the alignment of the memory address). A value of 0 or an
29572961 omitted "align" argument means that the operation has the preferential
29582962 alignment for the target. It is the responsibility of the code emitter
30423046 on the pointer type that is being indexed into. Pointer
30433047 and array types can use a 32-bit or 64-bit
30443048 integer type but the value will always be sign extended
3045 to 64-bits. Structure types require i32
3046 constants.

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

30473051
30483052

In the example above, the first index is indexing into the '%ST*'

30493053 type, which is a pointer, yielding a '%ST' = '{ i32, double, %RT
35513555
35523556
Overview:
35533557

The 'icmp' instruction returns a boolean value based on comparison

3554 of its two integer operands.

3558 of its two integer or pointer operands.

35553559
Arguments:
35563560

The 'icmp' instruction takes three operands. The first operand is

35573561 the condition code indicating the kind of comparison to perform. It is not
39173921
39183922

The 'getresult' instruction takes a call or invoke value as its

39193923 first argument. The value must have structure type.
3920 The second argument is an unsigned index value which must be in range for
3924 The second argument is a constant unsigned index value which must be in range for
39213925 the number of values returned by the call.

39223926
39233927
Semantics: