printf(" ");
mir_print_index(ins->dest);
- pan_print_alu_type(ins->dest_type, stdout);
- if (ins->mask != 0xF)
- mir_print_mask(ins->mask);
+ if (ins->dest) {
+ pan_print_alu_type(ins->dest_type, stdout);
+
+ if (ins->mask != 0xF)
+ mir_print_mask(ins->mask);
+ }
printf(", ");
mir_print_embedded_constant(ins, 0);
else {
mir_print_index(ins->src[0]);
- pan_print_alu_type(ins->src_types[0], stdout);
- mir_print_swizzle(ins->swizzle[0]);
+
+ if (ins->src[0] != ~0) {
+ pan_print_alu_type(ins->src_types[0], stdout);
+ mir_print_swizzle(ins->swizzle[0]);
+ }
}
printf(", ");
mir_print_embedded_constant(ins, 1);
else {
mir_print_index(ins->src[1]);
- pan_print_alu_type(ins->src_types[1], stdout);
- mir_print_swizzle(ins->swizzle[1]);
+
+ if (ins->src[1] != ~0) {
+ pan_print_alu_type(ins->src_types[1], stdout);
+ mir_print_swizzle(ins->swizzle[1]);
+ }
}
for (unsigned c = 2; c <= 3; ++c) {
printf(", ");
mir_print_index(ins->src[c]);
- pan_print_alu_type(ins->src_types[c], stdout);
- mir_print_swizzle(ins->swizzle[c]);
+
+ if (ins->src[c] != ~0) {
+ pan_print_alu_type(ins->src_types[c], stdout);
+ mir_print_swizzle(ins->swizzle[c]);
+ }
}
if (ins->no_spill)