Lines Matching refs:_

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