Add function for testing string attributes to InvokeInst and CallSite. NFC.
[oota-llvm.git] / include / llvm / IR / IntrinsicsXCore.td
1 //==- IntrinsicsXCore.td - XCore intrinsics                 -*- tablegen -*-==//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines all of the XCore-specific intrinsics.
11 //
12 //===----------------------------------------------------------------------===//
13
14 let TargetPrefix = "xcore" in {  // All intrinsics start with "llvm.xcore.".
15   // Miscellaneous instructions.
16   def int_xcore_bitrev : Intrinsic<[llvm_i32_ty],[llvm_i32_ty],[IntrNoMem]>,
17                          GCCBuiltin<"__builtin_bitrev">;
18   def int_xcore_crc8 : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
19                                  [llvm_i32_ty,llvm_i32_ty,llvm_i32_ty],
20                                  [IntrNoMem]>;
21   def int_xcore_crc32 : Intrinsic<[llvm_i32_ty],
22                                   [llvm_i32_ty,llvm_i32_ty,llvm_i32_ty],
23                                   [IntrNoMem]>;
24   def int_xcore_sext : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
25                                  [IntrNoMem]>;
26   def int_xcore_zext : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
27                                  [IntrNoMem]>;
28   def int_xcore_getid : Intrinsic<[llvm_i32_ty],[],[IntrNoMem]>,
29                         GCCBuiltin<"__builtin_getid">;
30   def int_xcore_getps : Intrinsic<[llvm_i32_ty],[llvm_i32_ty]>,
31                         GCCBuiltin<"__builtin_getps">;
32   def int_xcore_setps : Intrinsic<[],[llvm_i32_ty, llvm_i32_ty]>,
33                         GCCBuiltin<"__builtin_setps">;
34   def int_xcore_geted : Intrinsic<[llvm_i32_ty],[]>;
35   def int_xcore_getet : Intrinsic<[llvm_i32_ty],[]>;
36   def int_xcore_setsr : Intrinsic<[],[llvm_i32_ty]>;
37   def int_xcore_clrsr : Intrinsic<[],[llvm_i32_ty]>;
38
39   // Resource instructions.
40   def int_xcore_getr : Intrinsic<[llvm_anyptr_ty],[llvm_i32_ty]>;
41   def int_xcore_freer : Intrinsic<[],[llvm_anyptr_ty],
42                                    [NoCapture<0>]>;
43   def int_xcore_in : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],[NoCapture<0>]>;
44   def int_xcore_int : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],
45                                 [NoCapture<0>]>;
46   def int_xcore_inct : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],
47                                  [NoCapture<0>]>;
48   def int_xcore_out : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
49                                 [NoCapture<0>]>;
50   def int_xcore_outt : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
51                                  [NoCapture<0>]>;
52   def int_xcore_outct : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
53                                   [NoCapture<0>]>;
54   def int_xcore_chkct : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
55                                   [NoCapture<0>]>;
56   def int_xcore_testct : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],
57                                    [NoCapture<0>]>;
58   def int_xcore_testwct : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],
59                                     [NoCapture<0>]>;
60   def int_xcore_setd : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
61                                   [NoCapture<0>]>;
62   def int_xcore_setc : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
63                                   [NoCapture<0>]>;
64   def int_xcore_inshr : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty, llvm_i32_ty],
65                                   [NoCapture<0>]>;
66   def int_xcore_outshr : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty, llvm_i32_ty],
67                                   [NoCapture<0>]>;
68   def int_xcore_setpt : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
69                                   [NoCapture<0>]>;
70   def int_xcore_clrpt : Intrinsic<[],[llvm_anyptr_ty],
71                                   [NoCapture<0>]>;
72   def int_xcore_getts : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],
73                                   [NoCapture<0>]>;
74   def int_xcore_syncr : Intrinsic<[],[llvm_anyptr_ty],
75                                   [NoCapture<0>]>;
76   def int_xcore_settw : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
77                                   [NoCapture<0>]>;
78   def int_xcore_setv : Intrinsic<[],[llvm_anyptr_ty, llvm_ptr_ty],
79                                  [NoCapture<0>]>;
80   def int_xcore_setev : Intrinsic<[],[llvm_anyptr_ty, llvm_ptr_ty],
81                                   [NoCapture<0>]>;
82   def int_xcore_eeu : Intrinsic<[],[llvm_anyptr_ty], [NoCapture<0>]>;
83   def int_xcore_edu : Intrinsic<[],[llvm_anyptr_ty], [NoCapture<0>]>;
84   def int_xcore_setclk : Intrinsic<[],[llvm_anyptr_ty, llvm_anyptr_ty],
85                                    [NoCapture<0>, NoCapture<1>]>;
86   def int_xcore_setrdy : Intrinsic<[],[llvm_anyptr_ty, llvm_anyptr_ty],
87                                    [NoCapture<0>, NoCapture<1>]>;
88   def int_xcore_setpsc : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty],
89                                    [NoCapture<0>]>;
90   def int_xcore_peek : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],
91                                  [NoCapture<0>]>;
92   def int_xcore_endin : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],
93                                  [NoCapture<0>]>;
94
95   // Intrinsics for events.
96   def int_xcore_waitevent : Intrinsic<[llvm_ptr_ty],[], [IntrReadMem]>;
97
98   // If any of the resources owned by the thread are ready this returns the
99   // vector of one of the ready resources. If no resources owned by the thread
100   // are ready then the operand passed to the intrinsic is returned.
101   def int_xcore_checkevent : Intrinsic<[llvm_ptr_ty],[llvm_ptr_ty]>;
102
103   def int_xcore_clre : Intrinsic<[],[],[]>;
104
105   // Intrinsics for threads.
106   def int_xcore_getst : Intrinsic <[llvm_anyptr_ty],[llvm_anyptr_ty],
107                                    [NoCapture<0>]>;
108   def int_xcore_msync : Intrinsic <[],[llvm_anyptr_ty], [NoCapture<0>]>;
109   def int_xcore_ssync : Intrinsic <[],[]>;
110   def int_xcore_mjoin : Intrinsic <[],[llvm_anyptr_ty], [NoCapture<0>]>;
111   def int_xcore_initsp : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty],
112                                     [NoCapture<0>]>;
113   def int_xcore_initpc : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty],
114                                     [NoCapture<0>]>;
115   def int_xcore_initlr : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty],
116                                     [NoCapture<0>]>;
117   def int_xcore_initcp : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty],
118                                     [NoCapture<0>]>;
119   def int_xcore_initdp : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty],
120                                     [NoCapture<0>]>;
121 }