remove the read/write port/io intrinsics.
[oota-llvm.git] / include / llvm / Intrinsics.h
1 //===-- llvm/Instrinsics.h - LLVM Intrinsic Function Handling ---*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines a set of enums which allow processing of intrinsic
11 // functions.  Values of these enum types are returned by
12 // Function::getIntrinsicID.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_INTRINSICS_H
17 #define LLVM_INTRINSICS_H
18
19 namespace llvm {
20
21 /// Intrinsic Namespace - This namespace contains an enum with a value for
22 /// every intrinsic/builtin function known by LLVM.  These enum values are
23 /// returned by Function::getIntrinsicID().
24 ///
25 namespace Intrinsic {
26   enum ID {
27     not_intrinsic = 0,   // Must be zero
28
29     // Varargs handling intrinsics.
30     vastart,        // Used to implement the va_start macro in C
31     vaend,          // Used to implement the va_end macro in C
32     vacopy,         // Used to implement the va_copy macro in C
33
34     // Code generator intrinsics.
35     returnaddress,    // Yields the return address of a dynamic call frame
36     frameaddress,     // Yields the frame address of a dynamic call frame
37     stacksave,        // Save the stack pointer
38     stackrestore,     // Restore the stack pointer
39     prefetch,         // Prefetch a value into the cache
40     pcmarker,         // Export a PC from near the marker
41     readcyclecounter, // Read cycle counter register
42
43     // setjmp/longjmp intrinsics.
44     setjmp,         // Used to represent a setjmp call in C
45     longjmp,        // Used to represent a longjmp call in C
46     sigsetjmp,      // Used to represent a sigsetjmp call in C
47     siglongjmp,     // Used to represent a siglongjmp call in C
48
49     // Garbage Collection intrinsics.
50     gcroot,         // Defines a new GC root on the stack
51     gcread,         // Defines a read of a heap object  (for read barriers)
52     gcwrite,        // Defines a write to a heap object (for write barriers)
53
54     // Debugging intrinsics.
55     dbg_stoppoint,    // Represents source lines and breakpointable places
56     dbg_region_start, // Start of a region
57     dbg_region_end,   // End of a region
58     dbg_func_start,   // Start of a function
59     dbg_declare,      // Declare a local object
60
61     // Standard C library intrinsics.
62     memcpy_i32,      // Copy non-overlapping memory blocks.  i32 size.
63     memcpy_i64,      // Copy non-overlapping memory blocks.  i64 size.
64     memmove_i32,     // Copy potentially overlapping memory blocks.  i32 size.
65     memmove_i64,     // Copy potentially overlapping memory blocks.  i64 size.
66     memset_i32,      // Fill memory with a byte value.  i32 size.
67     memset_i64,      // Fill memory with a byte value.  i64 size.
68     isunordered_f32, // Return true if either float argument is a NaN
69     isunordered_f64, // Return true if either double argument is a NaN
70     sqrt_f32,        // Square root of float
71     sqrt_f64,        // Square root of double
72
73     // Bit manipulation instrinsics.
74     bswap_i16,      // Byteswap 16 bits
75     bswap_i32,      // Byteswap 32 bits
76     bswap_i64,      // Byteswap 64 bits
77     ctpop_i8,       // Count population of sbyte
78     ctpop_i16,      // Count population of short
79     ctpop_i32,      // Count population of int
80     ctpop_i64,      // Count population of long
81     ctlz_i8,        // Count leading zeros of sbyte
82     ctlz_i16,       // Count leading zeros of short
83     ctlz_i32,       // Count leading zeros of int
84     ctlz_i64,       // Count leading zeros of long
85     cttz_i8,        // Count trailing zeros of sbyte
86     cttz_i16,       // Count trailing zeros of short
87     cttz_i32,       // Count trailing zeros of int
88     cttz_i64,       // Count trailing zeros of long
89   };
90
91 } // End Intrinsic namespace
92
93 } // End llvm namespace
94
95 #endif