1 #include "gen_mips_new_nodes.h"
4 #include "mips_bearch_t.h"
5 #include "gen_mips_regalloc_if.h"
6 #include "mips_new_nodes_t.h"
11 ir_op *op_mips_addiu = NULL;
12 ir_op *op_mips_addu = NULL;
13 ir_op *op_mips_and = NULL;
14 ir_op *op_mips_andi = NULL;
15 ir_op *op_mips_b = NULL;
16 ir_op *op_mips_bcc = NULL;
17 ir_op *op_mips_div_hi = NULL;
18 ir_op *op_mips_div_lo = NULL;
19 ir_op *op_mips_divu_hi = NULL;
20 ir_op *op_mips_divu_lo = NULL;
21 ir_op *op_mips_ijmp = NULL;
22 ir_op *op_mips_jal = NULL;
23 ir_op *op_mips_jalr = NULL;
24 ir_op *op_mips_lb = NULL;
25 ir_op *op_mips_lbu = NULL;
26 ir_op *op_mips_lh = NULL;
27 ir_op *op_mips_lhu = NULL;
28 ir_op *op_mips_lui = NULL;
29 ir_op *op_mips_lw = NULL;
30 ir_op *op_mips_mult_hi = NULL;
31 ir_op *op_mips_mult_lo = NULL;
32 ir_op *op_mips_multu_hi = NULL;
33 ir_op *op_mips_nor = NULL;
34 ir_op *op_mips_or = NULL;
35 ir_op *op_mips_ori = NULL;
36 ir_op *op_mips_ret = NULL;
37 ir_op *op_mips_sb = NULL;
38 ir_op *op_mips_sh = NULL;
39 ir_op *op_mips_sll = NULL;
40 ir_op *op_mips_sllv = NULL;
41 ir_op *op_mips_slt = NULL;
42 ir_op *op_mips_sltiu = NULL;
43 ir_op *op_mips_sltu = NULL;
44 ir_op *op_mips_sra = NULL;
45 ir_op *op_mips_srav = NULL;
46 ir_op *op_mips_srl = NULL;
47 ir_op *op_mips_srlv = NULL;
48 ir_op *op_mips_subu = NULL;
49 ir_op *op_mips_sw = NULL;
50 ir_op *op_mips_switch = NULL;
51 ir_op *op_mips_xor = NULL;
52 ir_op *op_mips_xori = NULL;
55 static int mips_opcode_start = -1;
58 #define mips_op_tag FOURCC('m', 'i', 'p', 's')
61 int is_mips_op(
const ir_op *op)
63 return get_op_tag(op) == mips_op_tag;
67 int is_mips_irn(
const ir_node *node)
72 int get_mips_irn_opcode(
const ir_node *node)
74 assert(is_mips_irn(node));
79 #define BIT(x) (1 << (x))
86 static arch_register_req_t
const *in_reqs[] = {
87 &mips_class_reg_req_gp,
101 arch_irn_flags_t irn_flags = arch_irn_flags_none;
102 irn_flags |= arch_irn_flag_rematerializable;
104 be_info_init_irn(res, irn_flags, in_reqs, n_res);
109 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
110 out_infos[0].req = &mips_class_reg_req_gp;
118 static arch_register_req_t
const *in_reqs[] = {
119 &mips_class_reg_req_gp,
120 &mips_class_reg_req_gp,
135 arch_irn_flags_t irn_flags = arch_irn_flags_none;
136 irn_flags |= arch_irn_flag_rematerializable;
138 be_info_init_irn(res, irn_flags, in_reqs, n_res);
141 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
142 out_infos[0].req = &mips_class_reg_req_gp;
150 static arch_register_req_t
const *in_reqs[] = {
151 &mips_class_reg_req_gp,
152 &mips_class_reg_req_gp,
167 arch_irn_flags_t irn_flags = arch_irn_flags_none;
168 irn_flags |= arch_irn_flag_rematerializable;
170 be_info_init_irn(res, irn_flags, in_reqs, n_res);
173 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
174 out_infos[0].req = &mips_class_reg_req_gp;
182 static arch_register_req_t
const *in_reqs[] = {
183 &mips_class_reg_req_gp,
197 arch_irn_flags_t irn_flags = arch_irn_flags_none;
198 irn_flags |= arch_irn_flag_rematerializable;
200 be_info_init_irn(res, irn_flags, in_reqs, n_res);
205 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
206 out_infos[0].req = &mips_class_reg_req_gp;
214 arch_register_req_t
const **
const in_reqs = NULL;
223 arch_irn_flags_t irn_flags = arch_irn_flags_none;
224 irn_flags |= arch_irn_flag_simple_jump;
225 irn_flags |= arch_irn_flag_fallthrough;
227 be_info_init_irn(res, irn_flags, in_reqs, n_res);
230 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
231 out_infos[0].req = &arch_exec_requirement;
239 static arch_register_req_t
const *in_reqs[] = {
240 &mips_class_reg_req_gp,
241 &mips_class_reg_req_gp,
256 arch_irn_flags_t irn_flags = arch_irn_flags_none;
257 irn_flags |= arch_irn_flag_fallthrough;
259 be_info_init_irn(res, irn_flags, in_reqs, n_res);
263 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
264 out_infos[0].req = &arch_exec_requirement;
265 out_infos[1].req = &arch_exec_requirement;
273 static arch_register_req_t
const *in_reqs[] = {
274 &mips_class_reg_req_gp,
288 arch_irn_flags_t irn_flags = arch_irn_flags_none;
289 irn_flags |= arch_irn_flag_fallthrough;
291 be_info_init_irn(res, irn_flags, in_reqs, n_res);
295 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
296 out_infos[0].req = &arch_exec_requirement;
297 out_infos[1].req = &arch_exec_requirement;
305 static arch_register_req_t
const *in_reqs[] = {
306 &mips_class_reg_req_gp,
307 &mips_class_reg_req_gp,
322 arch_irn_flags_t irn_flags = arch_irn_flags_none;
324 be_info_init_irn(res, irn_flags, in_reqs, n_res);
327 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
328 out_infos[0].req = &mips_class_reg_req_gp;
336 static arch_register_req_t
const *in_reqs[] = {
337 &mips_class_reg_req_gp,
338 &mips_class_reg_req_gp,
353 arch_irn_flags_t irn_flags = arch_irn_flags_none;
355 be_info_init_irn(res, irn_flags, in_reqs, n_res);
358 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
359 out_infos[0].req = &mips_class_reg_req_gp;
367 static arch_register_req_t
const *in_reqs[] = {
368 &mips_class_reg_req_gp,
369 &mips_class_reg_req_gp,
384 arch_irn_flags_t irn_flags = arch_irn_flags_none;
386 be_info_init_irn(res, irn_flags, in_reqs, n_res);
389 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
390 out_infos[0].req = &mips_class_reg_req_gp;
398 static arch_register_req_t
const *in_reqs[] = {
399 &mips_class_reg_req_gp,
400 &mips_class_reg_req_gp,
415 arch_irn_flags_t irn_flags = arch_irn_flags_none;
417 be_info_init_irn(res, irn_flags, in_reqs, n_res);
420 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
421 out_infos[0].req = &mips_class_reg_req_gp;
429 static arch_register_req_t
const *in_reqs[] = {
430 &mips_class_reg_req_gp,
444 arch_irn_flags_t irn_flags = arch_irn_flags_none;
446 be_info_init_irn(res, irn_flags, in_reqs, n_res);
449 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
450 out_infos[0].req = &arch_exec_requirement;
456 ir_node *new_bd_mips_jal(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
int n_res,
ir_entity *
const ent, int32_t
const val)
466 arch_irn_flags_t irn_flags = arch_irn_flags_none;
467 be_info_init_irn(res, irn_flags, in_reqs, n_res);
477 ir_node *new_bd_mips_jalr(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
int n_res)
487 arch_irn_flags_t irn_flags = arch_irn_flags_none;
488 be_info_init_irn(res, irn_flags, in_reqs, n_res);
498 static arch_register_req_t
const *in_reqs[] = {
499 &arch_memory_requirement,
500 &mips_class_reg_req_gp,
515 arch_irn_flags_t irn_flags = arch_irn_flags_none;
517 be_info_init_irn(res, irn_flags, in_reqs, n_res);
522 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
523 out_infos[0].req = &arch_memory_requirement;
524 out_infos[1].req = &mips_class_reg_req_gp;
532 static arch_register_req_t
const *in_reqs[] = {
533 &arch_memory_requirement,
534 &mips_class_reg_req_gp,
549 arch_irn_flags_t irn_flags = arch_irn_flags_none;
551 be_info_init_irn(res, irn_flags, in_reqs, n_res);
556 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
557 out_infos[0].req = &arch_memory_requirement;
558 out_infos[1].req = &mips_class_reg_req_gp;
566 static arch_register_req_t
const *in_reqs[] = {
567 &arch_memory_requirement,
568 &mips_class_reg_req_gp,
583 arch_irn_flags_t irn_flags = arch_irn_flags_none;
585 be_info_init_irn(res, irn_flags, in_reqs, n_res);
590 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
591 out_infos[0].req = &arch_memory_requirement;
592 out_infos[1].req = &mips_class_reg_req_gp;
600 static arch_register_req_t
const *in_reqs[] = {
601 &arch_memory_requirement,
602 &mips_class_reg_req_gp,
617 arch_irn_flags_t irn_flags = arch_irn_flags_none;
619 be_info_init_irn(res, irn_flags, in_reqs, n_res);
624 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
625 out_infos[0].req = &arch_memory_requirement;
626 out_infos[1].req = &mips_class_reg_req_gp;
634 static arch_register_req_t
const *in_reqs[] = {
644 arch_irn_flags_t irn_flags = arch_irn_flags_none;
645 irn_flags |= arch_irn_flag_rematerializable;
647 be_info_init_irn(res, irn_flags, in_reqs, n_res);
652 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
653 out_infos[0].req = &mips_class_reg_req_gp;
661 static arch_register_req_t
const *in_reqs[] = {
662 &arch_memory_requirement,
663 &mips_class_reg_req_gp,
678 arch_irn_flags_t irn_flags = arch_irn_flags_none;
680 be_info_init_irn(res, irn_flags, in_reqs, n_res);
685 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
686 out_infos[0].req = &arch_memory_requirement;
687 out_infos[1].req = &mips_class_reg_req_gp;
695 static arch_register_req_t
const *in_reqs[] = {
696 &mips_class_reg_req_gp,
697 &mips_class_reg_req_gp,
712 arch_irn_flags_t irn_flags = arch_irn_flags_none;
713 irn_flags |= arch_irn_flag_rematerializable;
715 be_info_init_irn(res, irn_flags, in_reqs, n_res);
718 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
719 out_infos[0].req = &mips_class_reg_req_gp;
727 static arch_register_req_t
const *in_reqs[] = {
728 &mips_class_reg_req_gp,
729 &mips_class_reg_req_gp,
744 arch_irn_flags_t irn_flags = arch_irn_flags_none;
745 irn_flags |= arch_irn_flag_rematerializable;
747 be_info_init_irn(res, irn_flags, in_reqs, n_res);
750 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
751 out_infos[0].req = &mips_class_reg_req_gp;
759 static arch_register_req_t
const *in_reqs[] = {
760 &mips_class_reg_req_gp,
761 &mips_class_reg_req_gp,
776 arch_irn_flags_t irn_flags = arch_irn_flags_none;
777 irn_flags |= arch_irn_flag_rematerializable;
779 be_info_init_irn(res, irn_flags, in_reqs, n_res);
782 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
783 out_infos[0].req = &mips_class_reg_req_gp;
791 static arch_register_req_t
const *in_reqs[] = {
792 &mips_class_reg_req_gp,
793 &mips_class_reg_req_gp,
808 arch_irn_flags_t irn_flags = arch_irn_flags_none;
809 irn_flags |= arch_irn_flag_rematerializable;
811 be_info_init_irn(res, irn_flags, in_reqs, n_res);
814 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
815 out_infos[0].req = &mips_class_reg_req_gp;
823 static arch_register_req_t
const *in_reqs[] = {
824 &mips_class_reg_req_gp,
825 &mips_class_reg_req_gp,
840 arch_irn_flags_t irn_flags = arch_irn_flags_none;
841 irn_flags |= arch_irn_flag_rematerializable;
843 be_info_init_irn(res, irn_flags, in_reqs, n_res);
846 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
847 out_infos[0].req = &mips_class_reg_req_gp;
855 static arch_register_req_t
const *in_reqs[] = {
856 &mips_class_reg_req_gp,
870 arch_irn_flags_t irn_flags = arch_irn_flags_none;
871 irn_flags |= arch_irn_flag_rematerializable;
873 be_info_init_irn(res, irn_flags, in_reqs, n_res);
878 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
879 out_infos[0].req = &mips_class_reg_req_gp;
885 ir_node *new_bd_mips_ret(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs)
895 arch_irn_flags_t irn_flags = arch_irn_flags_none;
897 be_info_init_irn(res, irn_flags, in_reqs, n_res);
900 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
901 out_infos[0].req = &arch_exec_requirement;
909 static arch_register_req_t
const *in_reqs[] = {
910 &arch_memory_requirement,
911 &mips_class_reg_req_gp,
912 &mips_class_reg_req_gp,
928 arch_irn_flags_t irn_flags = arch_irn_flags_none;
930 be_info_init_irn(res, irn_flags, in_reqs, n_res);
935 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
936 out_infos[0].req = &arch_memory_requirement;
944 static arch_register_req_t
const *in_reqs[] = {
945 &arch_memory_requirement,
946 &mips_class_reg_req_gp,
947 &mips_class_reg_req_gp,
963 arch_irn_flags_t irn_flags = arch_irn_flags_none;
965 be_info_init_irn(res, irn_flags, in_reqs, n_res);
970 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
971 out_infos[0].req = &arch_memory_requirement;
979 static arch_register_req_t
const *in_reqs[] = {
980 &mips_class_reg_req_gp,
994 arch_irn_flags_t irn_flags = arch_irn_flags_none;
995 irn_flags |= arch_irn_flag_rematerializable;
997 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1002 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1003 out_infos[0].req = &mips_class_reg_req_gp;
1011 static arch_register_req_t
const *in_reqs[] = {
1012 &mips_class_reg_req_gp,
1013 &mips_class_reg_req_gp,
1028 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1029 irn_flags |= arch_irn_flag_rematerializable;
1030 int const n_res = 1;
1031 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1034 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1035 out_infos[0].req = &mips_class_reg_req_gp;
1043 static arch_register_req_t
const *in_reqs[] = {
1044 &mips_class_reg_req_gp,
1045 &mips_class_reg_req_gp,
1060 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1061 irn_flags |= arch_irn_flag_rematerializable;
1062 int const n_res = 1;
1063 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1066 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1067 out_infos[0].req = &mips_class_reg_req_gp;
1075 static arch_register_req_t
const *in_reqs[] = {
1076 &mips_class_reg_req_gp,
1090 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1091 irn_flags |= arch_irn_flag_rematerializable;
1092 int const n_res = 1;
1093 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1098 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1099 out_infos[0].req = &mips_class_reg_req_gp;
1107 static arch_register_req_t
const *in_reqs[] = {
1108 &mips_class_reg_req_gp,
1109 &mips_class_reg_req_gp,
1124 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1125 irn_flags |= arch_irn_flag_rematerializable;
1126 int const n_res = 1;
1127 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1130 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1131 out_infos[0].req = &mips_class_reg_req_gp;
1139 static arch_register_req_t
const *in_reqs[] = {
1140 &mips_class_reg_req_gp,
1154 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1155 irn_flags |= arch_irn_flag_rematerializable;
1156 int const n_res = 1;
1157 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1162 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1163 out_infos[0].req = &mips_class_reg_req_gp;
1171 static arch_register_req_t
const *in_reqs[] = {
1172 &mips_class_reg_req_gp,
1173 &mips_class_reg_req_gp,
1188 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1189 irn_flags |= arch_irn_flag_rematerializable;
1190 int const n_res = 1;
1191 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1194 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1195 out_infos[0].req = &mips_class_reg_req_gp;
1203 static arch_register_req_t
const *in_reqs[] = {
1204 &mips_class_reg_req_gp,
1218 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1219 irn_flags |= arch_irn_flag_rematerializable;
1220 int const n_res = 1;
1221 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1226 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1227 out_infos[0].req = &mips_class_reg_req_gp;
1235 static arch_register_req_t
const *in_reqs[] = {
1236 &mips_class_reg_req_gp,
1237 &mips_class_reg_req_gp,
1252 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1253 irn_flags |= arch_irn_flag_rematerializable;
1254 int const n_res = 1;
1255 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1258 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1259 out_infos[0].req = &mips_class_reg_req_gp;
1267 static arch_register_req_t
const *in_reqs[] = {
1268 &mips_class_reg_req_gp,
1269 &mips_class_reg_req_gp,
1284 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1285 irn_flags |= arch_irn_flag_rematerializable;
1286 int const n_res = 1;
1287 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1290 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1291 out_infos[0].req = &mips_class_reg_req_gp;
1299 static arch_register_req_t
const *in_reqs[] = {
1300 &arch_memory_requirement,
1301 &mips_class_reg_req_gp,
1302 &mips_class_reg_req_gp,
1318 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1319 int const n_res = 1;
1320 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1325 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1326 out_infos[0].req = &arch_memory_requirement;
1334 static arch_register_req_t
const *in_reqs[] = {
1335 &mips_class_reg_req_gp,
1349 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1350 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1353 be_switch_attr_init(res, &attr->swtch, table, table_entity);
1361 static arch_register_req_t
const *in_reqs[] = {
1362 &mips_class_reg_req_gp,
1363 &mips_class_reg_req_gp,
1378 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1379 irn_flags |= arch_irn_flag_rematerializable;
1380 int const n_res = 1;
1381 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1384 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1385 out_infos[0].req = &mips_class_reg_req_gp;
1393 static arch_register_req_t
const *in_reqs[] = {
1394 &mips_class_reg_req_gp,
1408 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1409 irn_flags |= arch_irn_flag_rematerializable;
1410 int const n_res = 1;
1411 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1416 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1417 out_infos[0].req = &mips_class_reg_req_gp;
1428 void mips_create_opcodes(
void)
1433 mips_opcode_start = cur_opcode;
1438 set_op_tag(op, mips_op_tag);
1444 set_op_tag(op, mips_op_tag);
1450 set_op_tag(op, mips_op_tag);
1456 set_op_tag(op, mips_op_tag);
1462 set_op_tag(op, mips_op_tag);
1468 set_op_tag(op, mips_op_tag);
1474 set_op_tag(op, mips_op_tag);
1475 op_mips_div_hi = op;
1480 set_op_tag(op, mips_op_tag);
1481 op_mips_div_lo = op;
1486 set_op_tag(op, mips_op_tag);
1487 op_mips_divu_hi = op;
1492 set_op_tag(op, mips_op_tag);
1493 op_mips_divu_lo = op;
1498 set_op_tag(op, mips_op_tag);
1504 set_op_tag(op, mips_op_tag);
1510 set_op_tag(op, mips_op_tag);
1516 set_op_tag(op, mips_op_tag);
1522 set_op_tag(op, mips_op_tag);
1528 set_op_tag(op, mips_op_tag);
1534 set_op_tag(op, mips_op_tag);
1540 set_op_tag(op, mips_op_tag);
1546 set_op_tag(op, mips_op_tag);
1552 set_op_tag(op, mips_op_tag);
1553 op_mips_mult_hi = op;
1558 set_op_tag(op, mips_op_tag);
1559 op_mips_mult_lo = op;
1564 set_op_tag(op, mips_op_tag);
1565 op_mips_multu_hi = op;
1570 set_op_tag(op, mips_op_tag);
1576 set_op_tag(op, mips_op_tag);
1582 set_op_tag(op, mips_op_tag);
1588 set_op_tag(op, mips_op_tag);
1594 set_op_tag(op, mips_op_tag);
1600 set_op_tag(op, mips_op_tag);
1606 set_op_tag(op, mips_op_tag);
1612 set_op_tag(op, mips_op_tag);
1618 set_op_tag(op, mips_op_tag);
1624 set_op_tag(op, mips_op_tag);
1630 set_op_tag(op, mips_op_tag);
1636 set_op_tag(op, mips_op_tag);
1642 set_op_tag(op, mips_op_tag);
1648 set_op_tag(op, mips_op_tag);
1654 set_op_tag(op, mips_op_tag);
1660 set_op_tag(op, mips_op_tag);
1666 set_op_tag(op, mips_op_tag);
1672 set_op_tag(op, mips_op_tag);
1673 op_mips_switch = op;
1678 set_op_tag(op, mips_op_tag);
1684 set_op_tag(op, mips_op_tag);
1689 void mips_free_opcodes(
void)
1691 free_ir_op(op_mips_addiu); op_mips_addiu = NULL;
1692 free_ir_op(op_mips_addu); op_mips_addu = NULL;
1694 free_ir_op(op_mips_andi); op_mips_andi = NULL;
1697 free_ir_op(op_mips_div_hi); op_mips_div_hi = NULL;
1698 free_ir_op(op_mips_div_lo); op_mips_div_lo = NULL;
1699 free_ir_op(op_mips_divu_hi); op_mips_divu_hi = NULL;
1700 free_ir_op(op_mips_divu_lo); op_mips_divu_lo = NULL;
1701 free_ir_op(op_mips_ijmp); op_mips_ijmp = NULL;
1703 free_ir_op(op_mips_jalr); op_mips_jalr = NULL;
1710 free_ir_op(op_mips_mult_hi); op_mips_mult_hi = NULL;
1711 free_ir_op(op_mips_mult_lo); op_mips_mult_lo = NULL;
1712 free_ir_op(op_mips_multu_hi); op_mips_multu_hi = NULL;
1720 free_ir_op(op_mips_sllv); op_mips_sllv = NULL;
1722 free_ir_op(op_mips_sltiu); op_mips_sltiu = NULL;
1723 free_ir_op(op_mips_sltu); op_mips_sltu = NULL;
1725 free_ir_op(op_mips_srav); op_mips_srav = NULL;
1727 free_ir_op(op_mips_srlv); op_mips_srlv = NULL;
1728 free_ir_op(op_mips_subu); op_mips_subu = NULL;
1730 free_ir_op(op_mips_switch); op_mips_switch = NULL;
1732 free_ir_op(op_mips_xori); op_mips_xori = NULL;
void set_op_dump(ir_op *op, dump_node_func func)
Sets dump callback func for operation op.
void * get_irn_generic_attr(ir_node *node)
Returns a pointer to the node attributes.
ir_mode * mode_X
execution
unsigned get_next_ir_opcodes(unsigned num)
Returns the next free n IR opcode number, allows to register a bunch of user ops. ...
void set_op_attrs_equal(ir_op *op, node_attrs_equal_func func)
Sets attrs_equal callback func for operation op.
ir_op * new_ir_op(unsigned code, const char *name, op_pin_state p, irop_flags flags, op_arity opar, int op_index, size_t attr_size)
Creates a new IR operation.
Nodes of this opcode can be placed in any basic block.
struct ir_graph ir_graph
Procedure Graph.
struct dbg_info dbg_info
Source Reference.
struct ir_node ir_node
Procedure Graph Node.
Forking control flow at this operation.
ir_node * new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mode, int arity, ir_node *const *in)
IR node constructor.
This operation is a control flow operation.
unsigned get_irn_opcode(const ir_node *node)
Returns the opcode-enum of the node.
struct ir_switch_table ir_switch_table
A switch table mapping integer numbers to proj-numbers of a Switch-node.
struct ir_entity ir_entity
Entity.
ir_graph * get_irn_irg(const ir_node *node)
Returns the ir_graph this node belongs to.
Node must remain in this basic block if it can throw an exception, else can float.
ir_op * get_irn_op(const ir_node *node)
Returns the opcode struct of the node.
void ir_op_set_memory_index(ir_op *op, int memory_index)
Sets memory input of operation using memory.
struct ir_op ir_op
Node Opcode.
ir_node * optimize_node(ir_node *n)
Applies local optimizations to a single node.
void free_ir_op(ir_op *code)
Frees an ir operation.
Nodes must remain in this basic block.
This operation jumps to an unknown destination.
ir_mode * mode_T
tuple (none)
void verify_new_node(ir_node *node)
If firm is built in debug mode, verify that a newly created node is fine.
void set_op_copy_attr(ir_op *op, copy_attr_func func)
Sets attribute copy callback func for operation op.
This operation has a memory input and may change the memory state.
Any other arity, either fixed for the opcode or known when creating the node.