{
printf("\t");
- switch (ins->type) {
- case TAG_ALU_4: {
- midgard_alu_op op = ins->alu.op;
- const char *name = alu_opcode_props[op].name;
-
+ if (midgard_is_branch_unit(ins->unit)) {
const char *branch_target_names[] = {
"goto", "break", "continue", "discard"
};
- if (ins->compact_branch)
- name = branch_target_names[ins->branch.target_type];
+ printf("%s.", mir_get_unit(ins->unit));
+ if (ins->branch.target_type == TARGET_DISCARD)
+ printf("discard.");
+ else if (ins->writeout)
+ printf("write.");
+ else if (ins->unit == ALU_ENAB_BR_COMPACT &&
+ !ins->branch.conditional)
+ printf("uncond.");
+ else
+ printf("cond.");
+
+ if (!ins->branch.conditional)
+ printf("always");
+ else if (ins->branch.invert_conditional)
+ printf("false");
+ else
+ printf("true");
+
+ if (ins->branch.target_type != TARGET_DISCARD)
+ printf(" %s -> block(%d)\n",
+ branch_target_names[ins->branch.target_type],
+ ins->branch.target_block);
+
+ return;
+ }
+
+ switch (ins->type) {
+ case TAG_ALU_4: {
+ midgard_alu_op op = ins->alu.op;
+ const char *name = alu_opcode_props[op].name;
if (ins->unit)
printf("%s.", mir_get_unit(ins->unit));