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