15 ins = [ "left", "right" ],
30 flags = "commutative",
34 ins = [ "mem", "size" ],
35 outs = [ "M", "X_regular", "X_except", "res" ],
36 flags = "fragile, uses_memory",
44 type = "ir_where_alloc"
48 attr_struct = "alloc_attr",
50 #if PRECISE_EXC_CONTEXT
51 firm_alloc_frag_arr(res, op_Alloc, &res->attr.alloc.exc.frag_arr);
59 flags = "dump_noblock",
67 flags = "commutative",
73 flags = "keep, uses_memory",
74 attr_struct = "asm_attr",
76 pinned_init = "op_pin_state_pinned",
79 name = "input_constraints",
80 type = "ir_asm_constraint*",
83 name = "n_output_constraints",
87 name = "output_constraints",
88 type = "ir_asm_constraint*",
103 java_noconstr = True,
108 flags = "cfopcode, fragile, start_block, dump_noblock",
122 attr_struct = "block_attr",
123 java_noconstr = True,
126 /* macroblock header */
129 res->attr.block.is_dead = 0;
130 res->attr.block.is_mb_head = 1;
131 res->attr.block.irg = irg;
132 res->attr.block.backedge = new_backedge_arr(irg->obst, arity);
133 res->attr.block.in_cg = NULL;
134 res->attr.block.cg_backedge = NULL;
135 res->attr.block.extblk = NULL;
136 res->attr.block.mb_depth = 0;
137 res->attr.block.entity = NULL;
139 set_Block_matured(res, 1);
140 set_Block_block_visited(res, 0);
149 /* Create and initialize array for Phi-node construction. */
150 if (get_irg_phase_state(current_ir_graph) == phase_building) {
151 res->attr.block.graph_arr = NEW_ARR_D(ir_node *, current_ir_graph->obst,
152 current_ir_graph->n_loc);
153 memset(res->attr.block.graph_arr, 0, sizeof(ir_node *)*current_ir_graph->n_loc);
156 for (i = arity - 1; i >= 0; i--)
157 if (is_Unknown(in[i])) {
162 if (!has_unknown) res = optimize_node(res);
164 current_ir_graph->current_block = res;
166 IRN_VRFY_IRG(res, current_ir_graph);
170 public void addPred(Node node) {
171 binding_cons.add_immBlock_pred(ptr, node.ptr);
174 public void mature() {
175 binding_cons.mature_immBlock(ptr);
179 public Block getBlock() {
183 public boolean blockVisited() {
184 return 0 != binding.Block_block_visited(ptr);
187 public void markBlockVisited() {
188 binding.mark_Block_block_visited(ptr);
191 public boolean isBad() {
192 return binding.is_Bad(ptr) != 0;
203 ins = [ "mem", "index", "lower", "upper" ],
204 outs = [ "M", "X_regular", "X_except", "res" ],
205 flags = "fragile, highlevel",
206 pinned = "exception",
207 pinned_init = "op_pin_state_pinned",
208 attr_struct = "bound_attr",
210 #if PRECISE_EXC_CONTEXT
211 firm_alloc_frag_arr(res, op_Bound, &res->attr.bound.exc.frag_arr);
225 outs = [ "M_regular", "X_regular", "X_except", "T_result", "M_except", "P_value_res_base" ],
226 flags = "uses_memory",
229 type = "ir_builtin_kind",
238 pinned_init = "op_pin_state_pinned",
239 attr_struct = "builtin_attr",
241 assert((get_unknown_type() == type) || is_Method_type(type));
244 # TODO: No firm_alloc_frag_arr??
248 ins = [ "mem", "ptr" ],
250 outs = [ "M_regular", "X_regular", "X_except", "T_result", "M_except", "P_value_res_base" ],
251 flags = "fragile, uses_memory",
258 attr_struct = "call_attr",
260 pinned_init = "op_pin_state_pinned",
262 assert((get_unknown_type() == type) || is_Method_type(type));
265 #if PRECISE_EXC_CONTEXT
266 firm_alloc_frag_arr(res, op_Call, &res->attr.call.exc.frag_arr);
273 outs = [ "" ], # TODO
274 flags = "cfopcode, ip_cfopcode",
276 # TODO: attribute with call...
277 attr_struct = "callbegin_attr",
284 java_noconstr = True,
289 flags = "commutative",
294 mode = "get_irn_mode(irn_op)",
303 attr_struct = "cast_attr",
304 init = "assert(is_atomic_type(type));"
309 outs = [ "False", "Eq", "Lt", "Le", "Gt", "Ge", "Lg", "Leg", "Uo", "Ue", "Ul", "Ule", "Ug", "Uge", "Ne", "True" ],
314 ins = [ "selector" ],
315 outs = [ "false", "true" ],
316 flags = "cfopcode, forking",
325 name = "default_proj",
331 type = "cond_jmp_predicate",
332 init = "COND_JMP_PRED_NONE"
335 attr_struct = "cond_attr"
339 ins = [ "value", "bound" ],
340 mode = "get_irn_mode(irn_value)",
349 attr_struct = "confirm_attr",
354 flags = "constlike, start_block",
364 attr_struct = "const_attr",
381 attr_struct = "conv_attr",
385 ins = [ "mem", "dst", "src" ],
386 outs = [ "M", "X_regular", "X_except" ],
387 flags = "fragile, highlevel, uses_memory",
394 attr_struct = "copyb_attr",
396 pinned_init = "op_pin_state_pinned",
398 #if PRECISE_EXC_CONTEXT
399 firm_alloc_frag_arr(res, op_CopyB, &res->attr.copyb.exc.frag_arr);
405 ins = [ "mem", "left", "right" ],
406 outs = [ "M", "X_regular", "X_except", "res" ],
407 flags = "fragile, uses_memory",
408 attrs_name = "divmod",
415 name = "no_remainder",
424 attr_struct = "divmod_attr",
425 pinned = "exception",
427 arity_override = "oparity_binary",
429 #if PRECISE_EXC_CONTEXT
430 firm_alloc_frag_arr(res, op_Div, &res->attr.except.frag_arr);
436 ins = [ "mem", "left", "right" ],
437 outs = [ "M", "X_regular", "X_except", "res_div", "res_mod" ],
438 flags = "fragile, uses_memory",
439 attrs_name = "divmod",
446 attr_struct = "divmod_attr",
447 pinned = "exception",
449 arity_override = "oparity_binary",
451 #if PRECISE_EXC_CONTEXT
452 firm_alloc_frag_arr(res, op_DivMod, &res->attr.except.frag_arr);
459 flags = "cfopcode, fragile, start_block, constlike, dump_noblock",
462 block = "get_irg_start_block(irg)",
477 flags = "cfopcode, ip_cfopcode",
485 flags = "cfopcode, ip_cfopcode",
491 flags = "commutative",
504 attr_struct = "filter_attr",
507 # TODO: Broken asserts in original:
508 # assert(get_Proj_pred(res));
509 # assert(get_nodes_block(get_Proj_pred(res)));
513 ins = [ "mem", "ptr", "size" ],
515 flags = "uses_memory",
524 type = "ir_where_alloc"
527 attr_struct = "free_attr",
540 flags = "cfopcode, forking, keep",
544 ins = [ "store", "obj" ],
545 outs = [ "M", "X_regular", "X_except", "res", "M_except" ],
553 attr_struct = "io_attr",
555 pinned_init = "op_pin_state_floats",
566 ins = [ "mem", "ptr" ],
567 outs = [ "M", "X_regular", "X_except", "res" ],
568 flags = "fragile, uses_memory",
569 pinned = "exception",
570 pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned",
575 java_name = "load_mode"
578 attr_struct = "load_attr",
581 type = "ir_cons_flags",
586 #if PRECISE_EXC_CONTEXT
587 firm_alloc_frag_arr(res, op_Load, &res->attr.load.exc.frag_arr);
598 ins = [ "mem", "left", "right" ],
599 outs = [ "M", "X_regular", "X_except", "res" ],
600 flags = "fragile, uses_memory",
601 attrs_name = "divmod",
608 attr_struct = "divmod_attr",
609 pinned = "exception",
611 arity_override = "oparity_binary",
613 #if PRECISE_EXC_CONTEXT
614 firm_alloc_frag_arr(res, op_Mod, &res->attr.except.frag_arr);
621 flags = "commutative",
626 flags = "commutative",
630 ins = [ "sel", "false", "true" ],
637 flags = "dump_noblock, dump_noinput",
650 flags = "commutative",
657 attr_struct = "phi_attr",
659 java_noconstr = True,
662 /* Memory Phis in endless loops must be kept alive.
663 As we can't distinguish these easily we keep all of them alive. */
664 if (is_Phi(res) && mode == mode_M)
665 add_End_keepalive(get_irg_end(irg), res);
671 mode = "get_irn_mode(irn_op)",
687 attr_struct = "long",
692 ins = [ "mem", "left", "right" ],
693 outs = [ "M", "X_regular", "X_except", "res" ],
694 flags = "fragile, uses_memory",
695 attrs_name = "divmod",
702 attr_struct = "divmod_attr",
703 pinned = "exception",
705 arity_override = "oparity_binary",
707 #if PRECISE_EXC_CONTEXT
708 firm_alloc_frag_arr(res, op_Quot, &res->attr.except.frag_arr);
714 ins = [ "mem", "exo_ptr" ],
716 flags = "highlevel, cfopcode",
734 ins = [ "mem", "ptr" ],
737 mode = "is_Method_type(get_entity_type(entity)) ? mode_P_code : mode_P_data",
745 attr_struct = "sel_attr",
771 ins = [ "mem", "ptr", "value" ],
772 outs = [ "M", "X_regular", "X_except" ],
773 flags = "fragile, uses_memory",
774 pinned = "exception",
775 attr_struct = "store_attr",
776 pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned",
779 type = "ir_cons_flags",
784 #if PRECISE_EXC_CONTEXT
785 firm_alloc_frag_arr(res, op_Store, &res->attr.store.exc.frag_arr);
797 flags = "constlike, start_block",
806 attr_struct = "symconst_attr",
807 java_noconstr = True,
829 block = "get_irg_start_block(irg)",
830 flags = "cfopcode, fragile, start_block, constlike, dump_noblock",