From a3e435fdfdc16af547b240d5efab59f132fe9021 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 4 Apr 2007 02:42:35 +0000 Subject: [PATCH] Remove intrinsics that we will not be implementing. Fix the anchor names of intrinsics to all be int_ so as to distinguish them from the i_ prefix reserved for instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35645 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 413 ++++++++-------------------------------------- 1 file changed, 67 insertions(+), 346 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index ee2dcd9440a..c54c8bec8ef 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -146,44 +146,45 @@
  1. Variable Argument Handling Intrinsics
      -
    1. 'llvm.va_start' Intrinsic
    2. -
    3. 'llvm.va_end' Intrinsic
    4. -
    5. 'llvm.va_copy' Intrinsic
    6. +
    7. 'llvm.va_start' Intrinsic
    8. +
    9. 'llvm.va_end' Intrinsic
    10. +
    11. 'llvm.va_copy' Intrinsic
  2. Accurate Garbage Collection Intrinsics
      -
    1. 'llvm.gcroot' Intrinsic
    2. -
    3. 'llvm.gcread' Intrinsic
    4. -
    5. 'llvm.gcwrite' Intrinsic
    6. +
    7. 'llvm.gcroot' Intrinsic
    8. +
    9. 'llvm.gcread' Intrinsic
    10. +
    11. 'llvm.gcwrite' Intrinsic
  3. Code Generator Intrinsics
      -
    1. 'llvm.returnaddress' Intrinsic
    2. -
    3. 'llvm.frameaddress' Intrinsic
    4. -
    5. 'llvm.stacksave' Intrinsic
    6. -
    7. 'llvm.stackrestore' Intrinsic
    8. -
    9. 'llvm.prefetch' Intrinsic
    10. -
    11. 'llvm.pcmarker' Intrinsic
    12. -
    13. llvm.readcyclecounter' Intrinsic
    14. +
    15. 'llvm.returnaddress' Intrinsic
    16. +
    17. 'llvm.frameaddress' Intrinsic
    18. +
    19. 'llvm.stacksave' Intrinsic
    20. +
    21. 'llvm.stackrestore' Intrinsic
    22. +
    23. 'llvm.prefetch' Intrinsic
    24. +
    25. 'llvm.pcmarker' Intrinsic
    26. +
    27. llvm.readcyclecounter' Intrinsic
  4. Standard C Library Intrinsics
      -
    1. 'llvm.memcpy.*' Intrinsic
    2. -
    3. 'llvm.memmove.*' Intrinsic
    4. -
    5. 'llvm.memset.*' Intrinsic
    6. -
    7. 'llvm.sqrt.*' Intrinsic
    8. -
    9. 'llvm.powi.*' Intrinsic
    10. +
    11. 'llvm.memcpy.*' Intrinsic
    12. +
    13. 'llvm.memmove.*' Intrinsic
    14. +
    15. 'llvm.memset.*' Intrinsic
    16. +
    17. 'llvm.sqrt.*' Intrinsic
    18. +
    19. 'llvm.powi.*' Intrinsic
  5. Bit Manipulation Intrinsics
      -
    1. 'llvm.bswap.*' Intrinsics
    2. +
    3. 'llvm.bswap.*' Intrinsics
    4. 'llvm.ctpop.*' Intrinsic
    5. 'llvm.ctlz.*' Intrinsic
    6. 'llvm.cttz.*' Intrinsic
    7. +
    8. 'llvm.part.select.*' Intrinsic
  6. Debugger intrinsics
  7. @@ -1498,7 +1499,7 @@ a call instruction. Thus, typically we have:

    -  %X = call i32 asm "bswap $0", "=r,r"(i32 %Y)
    +  %X = call i32 asm "bswap $0", "=r,r"(i32 %Y)
     

    @@ -3663,7 +3664,7 @@ declare void @llvm.va_end(i8*)

    @@ -3692,7 +3693,7 @@ last argument of the function, the compiler can figure that out.

    @@ -3701,7 +3702,7 @@ last argument of the function, the compiler can figure that out.

    Overview:

    The 'llvm.va_end' intrinsic destroys <arglist> -which has been initialized previously with llvm.va_start +which has been initialized previously with llvm.va_start or llvm.va_copy.

    Arguments:
    @@ -3712,15 +3713,15 @@ or llvm.va_copy.

    The 'llvm.va_end' intrinsic works just like the va_end macro available in C. In a target-dependent way, it destroys the va_list. -Calls to llvm.va_start and llvm.va_copy must be matched exactly +Calls to llvm.va_start and llvm.va_copy must be matched exactly with calls to llvm.va_end.

    @@ -3747,7 +3748,7 @@ The second argument is a pointer to a va_list element to copy from.

    The 'llvm.va_copy' intrinsic works just like the va_copy macro available in C. In a target-dependent way, it copies the source va_list element into the destination list. This intrinsic is necessary -because the llvm.va_start intrinsic may be +because the llvm.va_start intrinsic may be arbitrarily complex and require memory allocation, for example.

    @@ -3762,9 +3763,9 @@ arbitrarily complex and require memory allocation, for example.

    LLVM support for Accurate Garbage Collection requires the implementation and generation of these intrinsics. -These intrinsics allow identification of GC roots on the +These intrinsics allow identification of GC roots on the stack, as well as garbage collector implementations that require read and write barriers. +href="#int_gcread">read and write barriers. Front-ends for type-safe garbage collected languages should generate these intrinsics to make use of the LLVM garbage collectors. For more details, see Accurate Garbage Collection with LLVM. @@ -3773,7 +3774,7 @@ href="GarbageCollection.html">Accurate Garbage Collection with LLVM.

    @@ -3807,7 +3808,7 @@ the runtime to find the pointer at GC safe points.
    @@ -3842,7 +3843,7 @@ garbage collector runtime, as needed.

    @@ -3891,7 +3892,7 @@ be implemented with code generator support.
    @@ -3936,7 +3937,7 @@ source-language caller.
    @@ -3979,7 +3980,7 @@ source-language caller.
    @@ -3993,7 +3994,7 @@ source-language caller.

    The 'llvm.stacksave' intrinsic is used to remember the current state of -the function stack, for use with +the function stack, for use with llvm.stackrestore. This is useful for implementing language features like scoped automatic variable sized arrays in C99.

    @@ -4002,7 +4003,7 @@ features like scoped automatic variable sized arrays in C99.

    This intrinsic returns a opaque pointer value that can be passed to llvm.stackrestore. When an +href="#int_stackrestore">llvm.stackrestore. When an llvm.stackrestore intrinsic is executed with a value saved from llvm.stacksave, it effectively restores the state of the stack to the state it was in when the llvm.stacksave intrinsic executed. In @@ -4014,7 +4015,7 @@ that were allocated after the llvm.stacksave was executed.

    @@ -4029,7 +4030,7 @@ that were allocated after the llvm.stacksave was executed.

    The 'llvm.stackrestore' intrinsic is used to restore the state of the function stack to the state it was in when the corresponding llvm.stacksave intrinsic executed. This is +href="#int_stacksave">llvm.stacksave intrinsic executed. This is useful for implementing language features like scoped automatic variable sized arrays in C99.

    @@ -4037,7 +4038,7 @@ arrays in C99.
    Semantics:

    -See the description for llvm.stacksave. +See the description for llvm.stacksave.

    @@ -4045,7 +4046,7 @@ See the description for llvm.stacksave.
    @@ -4090,7 +4091,7 @@ performance.
    @@ -4131,7 +4132,7 @@ support this intrinisic may ignore it.
    @@ -4179,7 +4180,7 @@ for more efficient code generation.
    @@ -4233,7 +4234,7 @@ be set to 0 or 1.
    @@ -4288,7 +4289,7 @@ be set to 0 or 1.
    @@ -4341,7 +4342,7 @@ this can be specified as the fourth argument, otherwise it should be set to 0 or
    @@ -4377,7 +4378,7 @@ floating point number.
    @@ -4426,7 +4427,7 @@ These allow efficient code generation for some algorithms.
    @@ -4587,300 +4588,6 @@ of src. For example, llvm.cttz(2) = 1.

    - - - -
    -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.and.reduce on -any integer bit width. -

    -  declare i1 @llvm.bit.and.reduce.i32(i32 %val)
    -  declare i1 @llvm.bit.and.reduce.i97(i97 %val)
    -
    -
    Overview:
    -

    The 'llvm.bit.and.reduce' family of intrinsic functions applies the -AND operator bitwise to each bit in %val until it yields the result. -

    - -
    Arguments:
    -

    The argument may be any bit width. The result is always a 1-bit integer.

    - -
    Semantics:
    -

    The 'llvm.bit.and.reduce' intrinsic is the equivalent of a test -against -1. Only if all bits in %val are set will the result -be 1, otherwise 0.

    -
    - - - - -
    -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.or.reduce on -any integer bit width. -

    -  declare i1 @llvm.bit.or.reduce.i32(i32 %val)
    -  declare i1 @llvm.bit.or.reduce.i97(i97 %val)
    -
    -
    Overview:
    -

    The 'llvm.bit.or.reduce' family of intrinsic functions applies the -OR operator bitwise to each bit in %val until it yields the result. -

    - -
    Arguments:
    -

    The argument may be any bit width. The result is always a 1-bit integer.

    - -
    Semantics:
    -

    The 'llvm.bit.or.reduce' intrinsic is the equivalent of a test -against 0. Only if all bits in %val are clear will the result -be 0, otherwise 1.

    -
    - - - - -
    -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.xor.reduce on -any integer bit width. -

    -  declare i1 @llvm.bit.xor.reduce.i32(i32 %val)
    -  declare i1 @llvm.bit.xor.reduce.i97(i97 %val)
    -
    -
    Overview:
    -

    The 'llvm.bit.xor.reduce' family of intrinsic functions applies the -XOR operator bitwise to each bit in %val until it yields the result. -

    - -
    Arguments:
    -

    The argument may be any bit width. The result is always a 1-bit integer.

    - -
    Semantics:
    -

    The 'llvm.bit.xor.reduce' computes its result by performing an XOR -operation on the two lowest order bits in %val. That result is then -XOR'd with the next bit in %val and this process continues until all -bits in %val have been XOR'd with the result of the previous XORs. The -resulting bit is returned.

    -
    - - - - -
    -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.nand.reduce on -any integer bit width. -

    -  declare i1 @llvm.bit.nand.reduce.i32(i32 %val)
    -  declare i1 @llvm.bit.nand.reduce.i97(i97 %val)
    -
    -
    Overview:
    -

    The 'llvm.bit.nand.reduce' family of intrinsic functions applies the -NAND operator bitwise to each bit in %val until it yields the result. -

    - -
    Arguments:
    -

    The argument may be any bit width. The result is always a 1-bit integer.

    - -
    Semantics:
    -

    The 'llvm.bit.nand.reduce' intrinsic is the equivalent of taking the -complement of the llvm.bit.and.reduce intrinsic. That is, it returns 0 -if %val is all ones (-1) and 1 otherwise.

    -
    - - - - -
    -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.nor.reduce on -any integer bit width. -

    -  declare i1 @llvm.bit.nor.reduce.i32(i32 %val)
    -  declare i1 @llvm.bit.nor.reduce.i97(i97 %val)
    -
    -
    Overview:
    -

    The 'llvm.bit.nor.reduce' family of intrinsic functions applies the -NOR operator bitwise to each bit in %val until it yields the result. -

    - -
    Arguments:
    -

    The argument may be any bit width. The result is always a 1-bit integer.

    - -
    Semantics:
    -

    The 'llvm.bit.nor.reduce' intrinsic is equivalent to the complement -of the llvm.bit.or.reduce intrinsic. That is, it returns 1 if all bits -in %val are 0, and 1 otherwise.

    -
    - - - - -
    -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.nxor.reduce on -any integer bit width. -

    -  declare i1 @llvm.bit.nxor.reduce.i32(i32 %val)
    -  declare i1 @llvm.bit.nxor.reduce.i97(i97 %val)
    -
    -
    Overview:
    -

    The 'llvm.bit.nxor.reduce' family of intrinsic functions applies the -AND operator bitwise to each bit in %val until it yields the result. -

    - -
    Arguments:
    -

    The argument may be any bit width. The result is always a 1-bit integer.

    - -
    Semantics:
    -

    The 'llvm.bit.nxor.reduce' intrinsic is the equivalent of the -complement of the llvm.bit.xor.reduce intrinsic.

    -
    - - - - -
    -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.select on any -integer bit width. -

    -  declare i1 @llvm.bit.select.i17  (i17 %val, i32 %bit)
    -  declare i1 @llvm.bit.select.i29  (i29 %val, i32 %bit)
    -
    - -
    Overview:
    -

    The 'llvm.bit.select' family of intrinsic functions selects a -specific bit from an integer value and returns it.

    - -
    Arguments:
    -

    The two arguments may be any bit width. The result is always a 1-bit -integer. The first argument, %val may be any bit width and is the -value from which the bit is selected. The second argument, %bit must -be an i32 and is the bit index of the bit to be selected. Bits are -numbered starting with 0 as the lowest ordered bit.

    - -
    Semantics:
    -

    The 'llvm.bit.select' intrinsic is the equivalent of shift and a -truncate operation. The %val is shifted right by %bit bits and -then truncated to a 1-bit integer.

    -
    - - - - -
    -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.set on any -integer bit width. -

    -  declare i17 @llvm.bit.set.i17.i17 (i17 %val, i32 %bit)
    -  declare i52 @llvm.bit.set.i52.i52 (i52 %val, i32 %bit)
    -
    - -
    Overview:
    -

    -The 'llvm.bit.set' family of intrinsic functions sets a specific bit in -a %val and returns the result.

    - -
    Arguments:
    -

    The result and the first argument, %val, may be an integer of any -bit width, but they must be the same bit width. The second argument must be an -i32.

    - -
    Semantics:
    -

    The 'llvm.bit.set' intrinsic is the equivalent of creating a bit -mask for the %bit requested in the width of %val, ORing that -mask with %val and returning the result.

    -
    - - - - -
    - -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.clear on any -integer bit width. -

    -  declare i17 @llvm.bit.clear.i17.i17 (i17 %val, i32 %bit)
    -  declare i29 @llvm.bit.clear.i29.i29 (i29 %val, i32 %bit)
    -
    - -
    Overview:
    -

    The 'llvm.bit.clear' family of intrinsic functions clears a specific -bit in a value and returns the result.

    - -
    Arguments:
    -

    The result and the first argument, %val, may be an integer of any -bit width, but they must be the same bit width. The second argument must be an -i32.

    - -
    Semantics:
    -

    The 'llvm.bit.clear' intrinsic is the equivalent of making a bit -mask in the width of %val but with the bit at index %bit set -to zero, ANDing that mask with %val and returning the result.

    -
    - - - - -
    - -
    Syntax:
    -

    This is an overloaded intrinsic. You can use llvm.bit.concat on any -integer bit width. -

    -  declare i32 @llvm.bit.concat.i32.i17.i15 (i17 %hi, i15 %lo)
    -  declare i29 @llvm.bit.concat.i29.i12.i15 (i12 %hi, i15 %lo)
    -
    - -
    Overview:
    -

    The 'llvm.bit.concat' family of intrinsic functions concatenates two -integer values to produce a longer one.

    - -
    Arguments:
    -

    The two arguments may be any bit width. The result must be an integer type -whose bit width is the sum of the arguments' bit widths. The first argument, -%hi, represents the bits that will occupy the high order bit locations -in the concatenated result. The second argument, %lo, will occupy the -lower order bit locations in the result.

    - -
    Semantics:
    - -

    The 'llvm.bit.concat' intrinsic is the equivalent of two -zext instructions, a shl and an or. The operation -proceeds as follows:

    -
      -
    1. Each of the arguments is zext'd to the result bit width.
    2. -
    3. The %hi argument is shift left by the width of the %lo - argument (shifted into to high order bits).
    4. -
    5. The shifted %hi value and %lo are or'd together - to form the result.
    6. -
    -
    -
    'llvm.bit.part.select.*' Intrinsic @@ -4904,11 +4611,15 @@ the original value.

    Arguments:

    The first argument, %val and the result may be integer types of any bit width but they must have the same bit width. The second and third -arguments must be i32 type.

    +arguments must be i32 type since they specify only a bit index.

    Semantics:
    -

    The 'llvm.bit.part.select' intrinsic is the equivalent of shifting -%val right by %loBit bits and then ANDing it with a mask with +

    The operation of the 'llvm.bit.part.select' intrinsic has two modes +of operation: forwards and reverse. If %loBit is greater than +%hiBits then the intrinsic operates in reverse mode. Otherwise it +operates in forward mode.

    +

    In forward mode, this intrinsic is the equivalent of shifting %val +right by %loBit bits and then ANDing it with a mask with only the %hiBit - %loBit bits set, as follows:

    1. The %val is shifted right (LSHR) by the number of bits specified @@ -4918,6 +4629,16 @@ only the %hiBit - %loBit bits set, as follows:

    2. A mask of the retained bits is created by shifting a -1 value.
    3. The mask is ANDed with %val to produce the result.
    +

    In reverse mode, a similar computation is made except that:

    +
      +
    1. The bits selected wrap around to include both the highest and lowest bits. + For example, part_select(i16 X, 4, 7) selects bits from X with a mask of + 0x00F0 (forwards case) while part_select(i16 X, 8, 3) selects bits from X + with a mask of 0xFF0F.
    2. +
    3. The bits returned in the reverse case are reversed. So, if X has the value + 0x6ACF and we apply part_select(i16 X, 8, 3) to it, we get back the value + 0x0A6F.
    4. +