diff --git a/src/amd/compiler/aco_print_ir.cpp b/src/amd/compiler/aco_print_ir.cpp index 3af249abaa3..ea4b75ce9b4 100644 --- a/src/amd/compiler/aco_print_ir.cpp +++ b/src/amd/compiler/aco_print_ir.cpp @@ -357,27 +357,21 @@ print_instr_format_specific(enum amd_gfx_level gfx_level, const Instruction* ins break; } case aco_opcode::s_waitcnt_depctr: { - unsigned va_vdst = (imm >> 12) & 0xf; - unsigned va_sdst = (imm >> 9) & 0x7; - unsigned va_ssrc = (imm >> 8) & 0x1; - unsigned hold_cnt = (imm >> 7) & 0x1; - unsigned vm_vsrc = (imm >> 2) & 0x7; - unsigned va_vcc = (imm >> 1) & 0x1; - unsigned sa_sdst = imm & 0x1; - if (va_vdst != 0xf) - fprintf(output, " va_vdst(%d)", va_vdst); - if (va_sdst != 0x7) - fprintf(output, " va_sdst(%d)", va_sdst); - if (va_ssrc != 0x1) - fprintf(output, " va_ssrc(%d)", va_ssrc); - if (hold_cnt != 0x1) - fprintf(output, " holt_cnt(%d)", hold_cnt); - if (vm_vsrc != 0x7) - fprintf(output, " vm_vsrc(%d)", vm_vsrc); - if (va_vcc != 0x1) - fprintf(output, " va_vcc(%d)", va_vcc); - if (sa_sdst != 0x1) - fprintf(output, " sa_sdst(%d)", sa_sdst); + depctr_wait wait = parse_depctr_wait(instr); + if (wait.va_vdst != 0xf) + fprintf(output, " va_vdst(%d)", wait.va_vdst); + if (wait.va_sdst != 0x7) + fprintf(output, " va_sdst(%d)", wait.va_sdst); + if (wait.va_ssrc != 0x1) + fprintf(output, " va_ssrc(%d)", wait.va_ssrc); + if (wait.hold_cnt != 0x1) + fprintf(output, " holt_cnt(%d)", wait.hold_cnt); + if (wait.vm_vsrc != 0x7) + fprintf(output, " vm_vsrc(%d)", wait.vm_vsrc); + if (wait.va_vcc != 0x1) + fprintf(output, " va_vcc(%d)", wait.va_vcc); + if (wait.sa_sdst != 0x1) + fprintf(output, " sa_sdst(%d)", wait.sa_sdst); break; } case aco_opcode::s_delay_alu: {