1DEF_TM_BUILTIN (BUILT_IN_TM_START, "_ITM_beginTransaction",
2 BT_FN_UINT32_UINT32_VAR, ATTR_TM_NOTHROW_RT_LIST)
3
4DEF_TM_BUILTIN (BUILT_IN_TM_COMMIT, "_ITM_commitTransaction",
5 BT_FN_VOID, ATTR_TM_NOTHROW_LIST)
6DEF_TM_BUILTIN (BUILT_IN_TM_COMMIT_EH, "_ITM_commitTransactionEH",
7 BT_FN_VOID_PTR, ATTR_TM_NOTHROW_LIST)
8DEF_TM_BUILTIN (BUILT_IN_TM_ABORT, "_ITM_abortTransaction",
9 BT_FN_VOID_INT, ATTR_TM_NORETURN_NOTHROW_LIST)
10DEF_TM_BUILTIN (BUILT_IN_TM_IRREVOCABLE, "_ITM_changeTransactionMode",
11 BT_FN_VOID_INT, ATTR_TM_NOTHROW_LIST)
12
13DEF_TM_BUILTIN (BUILT_IN_TM_MEMCPY, "_ITM_memcpyRtWt",
14 BT_FN_VOID_PTR_CONST_PTR_SIZE, ATTR_TM_TMPURE_NOTHROW_LIST)
15DEF_TM_BUILTIN (BUILT_IN_TM_MEMCPY_RNWT, "_ITM_memcpyRnWt",
16 BT_FN_VOID_PTR_CONST_PTR_SIZE, ATTR_TM_TMPURE_NOTHROW_LIST)
17DEF_TM_BUILTIN (BUILT_IN_TM_MEMCPY_RTWN, "_ITM_memcpyRtWn",
18 BT_FN_VOID_PTR_CONST_PTR_SIZE, ATTR_TM_TMPURE_NOTHROW_LIST)
19DEF_TM_BUILTIN (BUILT_IN_TM_MEMMOVE, "_ITM_memmoveRtWt",
20 BT_FN_VOID_PTR_CONST_PTR_SIZE, ATTR_TM_TMPURE_NOTHROW_LIST)
21DEF_TM_BUILTIN (BUILT_IN_TM_MEMSET, "_ITM_memsetW",
22 BT_FN_VOID_PTR_INT_SIZE, ATTR_TM_TMPURE_NOTHROW_LIST)
23
24DEF_TM_BUILTIN (BUILT_IN_TM_GETTMCLONE_IRR, "_ITM_getTMCloneOrIrrevocable",
25 BT_FN_PTR_PTR, ATTR_TM_CONST_NOTHROW_LIST)
26DEF_TM_BUILTIN (BUILT_IN_TM_GETTMCLONE_SAFE, "_ITM_getTMCloneSafe",
27 BT_FN_PTR_PTR, ATTR_TM_CONST_NOTHROW_LIST)
28
29/* Memory allocation builtins. */
30DEF_TM_BUILTIN (BUILT_IN_TM_MALLOC, "_ITM_malloc",
31 BT_FN_PTR_SIZE, ATTR_TMPURE_MALLOC_NOTHROW_LIST)
32DEF_TM_BUILTIN (BUILT_IN_TM_CALLOC, "_ITM_calloc",
33 BT_FN_PTR_SIZE_SIZE, ATTR_TMPURE_MALLOC_NOTHROW_LIST)
34DEF_TM_BUILTIN (BUILT_IN_TM_FREE, "_ITM_free",
35 BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
36
37/* Logging builtins. */
38DEF_TM_BUILTIN (BUILT_IN_TM_LOG_1, "_ITM_LU1",
39 BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST)
40DEF_TM_BUILTIN (BUILT_IN_TM_LOG_2, "_ITM_LU2",
41 BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST)
42DEF_TM_BUILTIN (BUILT_IN_TM_LOG_4, "_ITM_LU4",
43 BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST)
44DEF_TM_BUILTIN (BUILT_IN_TM_LOG_8, "_ITM_LU8",
45 BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST)
46DEF_TM_BUILTIN (BUILT_IN_TM_LOG_FLOAT, "_ITM_LF",
47 BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST)
48DEF_TM_BUILTIN (BUILT_IN_TM_LOG_DOUBLE, "_ITM_LD",
49 BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST)
50DEF_TM_BUILTIN (BUILT_IN_TM_LOG_LDOUBLE, "_ITM_LE",
51 BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST)
52DEF_TM_BUILTIN (BUILT_IN_TM_LOG, "_ITM_LB",
53 BT_FN_VOID_VPTR_SIZE, ATTR_TM_TMPURE_NOTHROW_LIST)
54
55/* These stubs should get defined in the backend if applicable. */
56DEF_BUILTIN_STUB (BUILT_IN_TM_LOG_M64, "__builtin__ITM_LM64")
57DEF_BUILTIN_STUB (BUILT_IN_TM_LOG_M128, "__builtin__ITM_LM128")
58DEF_BUILTIN_STUB (BUILT_IN_TM_LOG_M256, "__builtin__ITM_LM256")
59
60/* Writes.
61
62 Note: The writes must follow the following order: STORE, WAR, WAW.
63 The TM optimizations depend on this order.
64
65 BUILT_IN_TM_STORE_1 must be the first builtin.
66 BUILTIN_TM_LOAD_STORE_P depends on this. */
67DEF_TM_BUILTIN (BUILT_IN_TM_STORE_1, "_ITM_WU1",
68 BT_FN_VOID_VPTR_I1, ATTR_TM_NOTHROW_LIST)
69DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAR_1, "_ITM_WaRU1",
70 BT_FN_VOID_VPTR_I1, ATTR_TM_NOTHROW_LIST)
71DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAW_1, "_ITM_WaWU1",
72 BT_FN_VOID_VPTR_I1, ATTR_TM_NOTHROW_LIST)
73
74DEF_TM_BUILTIN (BUILT_IN_TM_STORE_2, "_ITM_WU2",
75 BT_FN_VOID_VPTR_I2, ATTR_TM_NOTHROW_LIST)
76DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAR_2, "_ITM_WaRU2",
77 BT_FN_VOID_VPTR_I2, ATTR_TM_NOTHROW_LIST)
78DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAW_2, "_ITM_WaWU2",
79 BT_FN_VOID_VPTR_I2, ATTR_TM_NOTHROW_LIST)
80
81DEF_TM_BUILTIN (BUILT_IN_TM_STORE_4, "_ITM_WU4",
82 BT_FN_VOID_VPTR_I4, ATTR_TM_NOTHROW_LIST)
83DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAR_4, "_ITM_WaRU4",
84 BT_FN_VOID_VPTR_I4, ATTR_TM_NOTHROW_LIST)
85DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAW_4, "_ITM_WaWU4",
86 BT_FN_VOID_VPTR_I4, ATTR_TM_NOTHROW_LIST)
87
88DEF_TM_BUILTIN (BUILT_IN_TM_STORE_8, "_ITM_WU8",
89 BT_FN_VOID_VPTR_I8, ATTR_TM_NOTHROW_LIST)
90DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAR_8, "_ITM_WaRU8",
91 BT_FN_VOID_VPTR_I8, ATTR_TM_NOTHROW_LIST)
92DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAW_8, "_ITM_WaWU8",
93 BT_FN_VOID_VPTR_I8, ATTR_TM_NOTHROW_LIST)
94
95DEF_TM_BUILTIN (BUILT_IN_TM_STORE_FLOAT, "_ITM_WF",
96 BT_FN_VOID_VPTR_FLOAT, ATTR_TM_NOTHROW_LIST)
97DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAR_FLOAT, "_ITM_WaRF",
98 BT_FN_VOID_VPTR_FLOAT, ATTR_TM_NOTHROW_LIST)
99DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAW_FLOAT, "_ITM_WaWF",
100 BT_FN_VOID_VPTR_FLOAT, ATTR_TM_NOTHROW_LIST)
101
102DEF_TM_BUILTIN (BUILT_IN_TM_STORE_DOUBLE, "_ITM_WD",
103 BT_FN_VOID_VPTR_DOUBLE, ATTR_TM_NOTHROW_LIST)
104DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAR_DOUBLE, "_ITM_WaRD",
105 BT_FN_VOID_VPTR_DOUBLE, ATTR_TM_NOTHROW_LIST)
106DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAW_DOUBLE, "_ITM_WaWD",
107 BT_FN_VOID_VPTR_DOUBLE, ATTR_TM_NOTHROW_LIST)
108
109/* These stubs should get defined in the backend if applicable. */
110DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_M64, "__builtin__ITM_WM64")
111DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_WAR_M64, "__builtin__ITM_WaRM64")
112DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_WAW_M64, "__builtin__ITM_WaWM64")
113DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_M128, "__builtin__ITM_WM128")
114DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_WAR_M128, "__builtin__ITM_WaRM128")
115DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_WAW_M128, "__builtin__ITM_WaWM128")
116DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_M256, "__builtin__ITM_WM256")
117DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_WAR_M256, "__builtin__ITM_WaRM256")
118DEF_BUILTIN_STUB (BUILT_IN_TM_STORE_WAW_M256, "__builtin__ITM_WaWM256")
119
120DEF_TM_BUILTIN (BUILT_IN_TM_STORE_LDOUBLE, "_ITM_WE",
121 BT_FN_VOID_VPTR_LDOUBLE, ATTR_TM_NOTHROW_LIST)
122DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAR_LDOUBLE, "_ITM_WaRE",
123 BT_FN_VOID_VPTR_LDOUBLE, ATTR_TM_NOTHROW_LIST)
124DEF_TM_BUILTIN (BUILT_IN_TM_STORE_WAW_LDOUBLE, "_ITM_WaWE",
125 BT_FN_VOID_VPTR_LDOUBLE, ATTR_TM_NOTHROW_LIST)
126/* Note: BUILT_IN_TM_STORE_WAW_LDOUBLE must be the last TM store.
127 BUILTIN_TM_STORE_P depends on this. */
128
129/* Reads.
130
131 Note: The reads must follow the following order: LOAD, RAR, RAW, RFW.
132 The TM optimizations depend on this order. */
133DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_1, "_ITM_RU1",
134 BT_FN_I1_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
135DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAR_1, "_ITM_RaRU1",
136 BT_FN_I1_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
137DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAW_1, "_ITM_RaWU1",
138 BT_FN_I1_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
139DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RFW_1, "_ITM_RfWU1",
140 BT_FN_I1_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
141
142DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_2, "_ITM_RU2",
143 BT_FN_I2_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
144DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAR_2, "_ITM_RaRU2",
145 BT_FN_I2_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
146DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAW_2, "_ITM_RaWU2",
147 BT_FN_I2_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
148DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RFW_2, "_ITM_RfWU2",
149 BT_FN_I2_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
150
151DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_4, "_ITM_RU4",
152 BT_FN_I4_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
153DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAR_4, "_ITM_RaRU4",
154 BT_FN_I4_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
155DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAW_4, "_ITM_RaWU4",
156 BT_FN_I4_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
157DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RFW_4, "_ITM_RfWU4",
158 BT_FN_I4_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
159
160DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_8, "_ITM_RU8",
161 BT_FN_I8_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
162DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAR_8, "_ITM_RaRU8",
163 BT_FN_I8_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
164DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAW_8, "_ITM_RaWU8",
165 BT_FN_I8_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
166DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RFW_8, "_ITM_RfWU8",
167 BT_FN_I8_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
168
169DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_FLOAT, "_ITM_RF",
170 BT_FN_FLOAT_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
171DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAR_FLOAT, "_ITM_RaRF",
172 BT_FN_FLOAT_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
173DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAW_FLOAT, "_ITM_RaWF",
174 BT_FN_FLOAT_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
175DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RFW_FLOAT, "_ITM_RfWF",
176 BT_FN_FLOAT_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
177
178DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_DOUBLE, "_ITM_RD",
179 BT_FN_DOUBLE_CONST_DOUBLE_PTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
180DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAR_DOUBLE, "_ITM_RaRD",
181 BT_FN_DOUBLE_CONST_DOUBLE_PTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
182DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAW_DOUBLE, "_ITM_RaWD",
183 BT_FN_DOUBLE_CONST_DOUBLE_PTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
184DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RFW_DOUBLE, "_ITM_RfWD",
185 BT_FN_DOUBLE_CONST_DOUBLE_PTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
186
187/* These stubs should get defined in the backend if applicable. */
188DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_M64, "__builtin__ITM_RM64")
189DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RAR_M64, "__builtin__ITM_RaRM64")
190DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RAW_M64, "__builtin__ITM_RaRM64")
191DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RFW_M64, "__builtin__ITM_RfWM64")
192DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_M128, "__builtin__ITM_RM128")
193DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RAR_M128, "__builtin__ITM_RaRM128")
194DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RAW_M128, "__builtin__ITM_RaRM128")
195DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RFW_M128, "__builtin__ITM_RfWM128")
196DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_M256, "__builtin__ITM_RM256")
197DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RAR_M256, "__builtin__ITM_RaRM256")
198DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RAW_M256, "__builtin__ITM_RaRM256")
199DEF_BUILTIN_STUB (BUILT_IN_TM_LOAD_RFW_M256, "__builtin__ITM_RfWM256")
200
201DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_LDOUBLE, "_ITM_RE",
202 BT_FN_LDOUBLE_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
203DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAR_LDOUBLE, "_ITM_RaRE",
204 BT_FN_LDOUBLE_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
205DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RAW_LDOUBLE, "_ITM_RaWE",
206 BT_FN_LDOUBLE_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
207DEF_TM_BUILTIN (BUILT_IN_TM_LOAD_RFW_LDOUBLE, "_ITM_RfWE",
208 BT_FN_LDOUBLE_VPTR, ATTR_TM_PURE_TMPURE_NOTHROW_LIST)
209
210/* Note: BUILT_IN_TM_LOAD_RFW_LDOUBLE must be the last TM load as well
211 as the last builtin. BUILTIN_TM_LOAD_STORE_P and BUILTIN_TM_LOAD_P
212 depend on this. */
213