Lines Matching refs:_

126 #define IR_TYPES(_) \  argument
127 _(BOOL, bool, b, IR_TYPE_BOOL) \
128 _(U8, uint8_t, u8, IR_TYPE_UNSIGNED) \
129 _(U16, uint16_t, u16, IR_TYPE_UNSIGNED) \
130 _(U32, uint32_t, u32, IR_TYPE_UNSIGNED) \
131 _(U64, uint64_t, u64, IR_TYPE_UNSIGNED) \
132 _(ADDR, uintptr_t, addr, IR_TYPE_ADDR) \
133 _(CHAR, char, c, IR_TYPE_CHAR) \
134 _(I8, int8_t, i8, IR_TYPE_SIGNED) \
135 _(I16, int16_t, i16, IR_TYPE_SIGNED) \
136 _(I32, int32_t, i32, IR_TYPE_SIGNED) \
137 _(I64, int64_t, i64, IR_TYPE_SIGNED) \
138 _(DOUBLE, double, d, IR_TYPE_FP) \
139 _(FLOAT, float, f, IR_TYPE_FP) \
218 #define IR_OPS(_) \ argument
220 _(NOP, v, ___, ___, ___) /* empty instruction */ \
223 _(C_BOOL, r0, ___, ___, ___) /* constant */ \
224 _(C_U8, r0, ___, ___, ___) /* constant */ \
225 _(C_U16, r0, ___, ___, ___) /* constant */ \
226 _(C_U32, r0, ___, ___, ___) /* constant */ \
227 _(C_U64, r0, ___, ___, ___) /* constant */ \
228 _(C_ADDR, r0, ___, ___, ___) /* constant */ \
229 _(C_CHAR, r0, ___, ___, ___) /* constant */ \
230 _(C_I8, r0, ___, ___, ___) /* constant */ \
231 _(C_I16, r0, ___, ___, ___) /* constant */ \
232 _(C_I32, r0, ___, ___, ___) /* constant */ \
233 _(C_I64, r0, ___, ___, ___) /* constant */ \
234 _(C_DOUBLE, r0, ___, ___, ___) /* constant */ \
235 _(C_FLOAT, r0, ___, ___, ___) /* constant */ \
238 _(EQ, d2C, def, def, ___) /* equal */ \
239 _(NE, d2C, def, def, ___) /* not equal */ \
242 _(LT, d2, def, def, ___) /* less */ \
243 _(GE, d2, def, def, ___) /* greater or equal */ \
244 _(LE, d2, def, def, ___) /* less or equal */ \
245 _(GT, d2, def, def, ___) /* greater */ \
246 _(ULT, d2, def, def, ___) /* unsigned less */ \
247 _(UGE, d2, def, def, ___) /* unsigned greater or equal */ \
248 _(ULE, d2, def, def, ___) /* unsigned less or equal */ \
249 _(UGT, d2, def, def, ___) /* unsigned greater */ \
252 _(ADD, d2C, def, def, ___) /* addition */ \
253 _(SUB, d2, def, def, ___) /* subtraction (must be ADD+1) */ \
254 _(MUL, d2C, def, def, ___) /* multiplication */ \
255 _(DIV, d2, def, def, ___) /* division */ \
256 _(MOD, d2, def, def, ___) /* modulo */ \
257 _(NEG, d1, def, ___, ___) /* change sign */ \
258 _(ABS, d1, def, ___, ___) /* absolute value */ \
262 _(SEXT, d1, def, ___, ___) /* sign extension */ \
263 _(ZEXT, d1, def, ___, ___) /* zero extension */ \
264 _(TRUNC, d1, def, ___, ___) /* truncates to int type */ \
265 _(BITCAST, d1, def, ___, ___) /* binary representation */ \
266 _(INT2FP, d1, def, ___, ___) /* int to float conversion */ \
267 _(FP2INT, d1, def, ___, ___) /* float to int conversion */ \
268 _(FP2FP, d1, def, ___, ___) /* float to float conversion */ \
269 _(PROTO, d1X1, def, pro, ___) /* apply function prototype */ \
272 _(ADD_OV, d2C, def, def, ___) /* addition */ \
273 _(SUB_OV, d2, def, def, ___) /* subtraction */ \
274 _(MUL_OV, d2C, def, def, ___) /* multiplication */ \
275 _(OVERFLOW, d1, def, ___, ___) /* overflow check add/sub/mul */ \
278 _(NOT, d1, def, ___, ___) /* bitwise NOT */ \
279 _(OR, d2C, def, def, ___) /* bitwise OR */ \
280 _(AND, d2C, def, def, ___) /* bitwise AND */ \
281 _(XOR, d2C, def, def, ___) /* bitwise XOR */ \
282 _(SHL, d2, def, def, ___) /* logic shift left */ \
283 _(SHR, d2, def, def, ___) /* logic shift right */ \
284 _(SAR, d2, def, def, ___) /* arithmetic shift right */ \
285 _(ROL, d2, def, def, ___) /* rotate left */ \
286 _(ROR, d2, def, def, ___) /* rotate right */ \
287 _(BSWAP, d1, def, ___, ___) /* byte swap */ \
288 _(CTPOP, d1, def, ___, ___) /* count population */ \
289 _(CTLZ, d1, def, ___, ___) /* count leading zeros */ \
290 _(CTTZ, d1, def, ___, ___) /* count trailing zeros */ \
293 _(MIN, d2C, def, def, ___) /* min(op1, op2) */ \
294 _(MAX, d2C, def, def, ___) /* max(op1, op2) */ \
295 _(COND, d3, def, def, def) /* op1 ? op2 : op3 */ \
298 _(PHI, pN, reg, def, def) /* SSA Phi function */ \
299 _(COPY, d1X1, def, opt, ___) /* COPY (last foldable op) */ \
300 _(PI, p2, reg, def, ___) /* e-SSA Pi constraint ??? */ \
301 _(FRAME_ADDR, d0, ___, ___, ___) /* function frame address */ \
305 _(PARAM, p1X2, reg, str, num) /* incoming parameter proj. */ \
306 _(VAR, p1X1, reg, str, ___) /* local variable */ \
307 _(FUNC_ADDR, r0, ___, ___, ___) /* constant func ref */ \
308 _(FUNC, r0, ___, ___, ___) /* constant func ref */ \
309 _(SYM, r0, ___, ___, ___) /* constant symbol ref */ \
310 _(STR, r0, ___, ___, ___) /* constant str ref */ \
313 _(CALL, xN, src, def, def) /* CALL(src, func, args...) */ \
314 _(TAILCALL, xN, src, def, def) /* CALL+RETURN */ \
317 _(ALLOCA, a2, src, def, ___) /* alloca(def) */ \
318 _(AFREE, a2, src, def, ___) /* revert alloca(def) */ \
319 _(BLOCK_BEGIN, a1, src, ___, ___) /* stacksave */ \
320 _(BLOCK_END, a2, src, def, ___) /* stackrestore */ \
321 _(VADDR, d1, var, ___, ___) /* load address of local var */ \
322 _(VLOAD, l2, src, var, ___) /* load value of local var */ \
323 _(VSTORE, s3, src, var, def) /* store value to local var */ \
324 _(RLOAD, l1X2, src, num, opt) /* load value from register */ \
325 _(RSTORE, s2X1, src, def, num) /* store value into register */ \
326 _(LOAD, l2, src, ref, ___) /* load from memory */ \
327 _(STORE, s3, src, ref, def) /* store to memory */ \
328 _(TLS, l1X2, src, num, num) /* thread local variable */ \
329 _(TRAP, x1, src, ___, ___) /* DebugBreak */ \
333 _(VA_START, x2, src, def, ___) /* va_start(va_list) */ \
334 _(VA_END, x2, src, def, ___) /* va_end(va_list) */ \
335 _(VA_COPY, x3, src, def, def) /* va_copy(dst, stc) */ \
336 _(VA_ARG, x2, src, def, ___) /* va_arg(va_list) */ \
339 _(GUARD, c3, src, def, def) /* IF without second successor */ \
340 _(GUARD_NOT , c3, src, def, def) /* IF without second successor */ \
343 _(SNAPSHOT, xN, src, def, def) /* SNAPSHOT(src, args...) */ \
346 _(START, S0X1, ret, ___, ___) /* function start */ \
347 _(ENTRY, S1X1, src, num, ___) /* entry with a fake src edge */ \
348 _(BEGIN, S1, src, ___, ___) /* block start */ \
349 _(IF_TRUE, S1X1, src, prb, ___) /* IF TRUE proj. */ \
350 _(IF_FALSE, S1X1, src, prb, ___) /* IF FALSE proj. */ \
351 _(CASE_VAL, S2X1, src, def, prb) /* switch proj. */ \
352 _(CASE_DEFAULT, S1X1, src, prb, ___) /* switch proj. */ \
353 _(MERGE, SN, src, src, src) /* control merge */ \
354 _(LOOP_BEGIN, SN, src, src, src) /* loop start */ \
355 _(END, E1, src, ___, ___) /* block end */ \
356 _(LOOP_END, E1, src, ___, ___) /* loop end */ \
357 _(IF, E2, src, def, ___) /* conditional control split */ \
358 _(SWITCH, E2, src, def, ___) /* multi-way control split */ \
359 _(RETURN, T2X1, src, def, ret) /* function return */ \
360 _(IJMP, T2X1, src, def, ret) /* computed goto */ \
361 _(UNREACHABLE, T1X2, src, ___, ret) /* unreachable (tailcall, etc) */ \
364 _(EXITCALL, x2, src, def, ___) /* save CPU regs and call op2 */ \