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