The branch instruction has 6 bits per register operand which allows it
to specify a component in the register.
Fix codegen so that it outputs the right component, otherwise it always
outputs the x component.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
branch = ppir_node_to_branch(node);
b->branch.unknown_0 = 0x0;
- b->branch.arg0_source = ppir_target_get_src_reg_index(&branch->src[0]);
- b->branch.arg1_source = ppir_target_get_src_reg_index(&branch->src[1]);
+ b->branch.arg0_source = get_scl_reg_index(&branch->src[0], 0);
+ b->branch.arg1_source = get_scl_reg_index(&branch->src[1], 0);
b->branch.cond_gt = branch->cond_gt;
b->branch.cond_eq = branch->cond_eq;
b->branch.cond_lt = branch->cond_lt;