[GPU] Ucode disasm: Fix exec formatting

This commit is contained in:
Triang3l 2022-04-26 23:08:31 +03:00
parent 69958cba9d
commit df9a37f798
1 changed files with 11 additions and 9 deletions

View File

@ -148,15 +148,17 @@ void ParsedExecInstruction::Disassemble(StringBuffer* out) const {
out->AppendFormat("{}", opcode_name);
break;
case Type::kConditional:
out->AppendFormat(" {} ", opcode_name);
if (!condition) {
out->Append('!');
}
out->AppendFormat("b{}", bool_constant_index);
out->AppendFormat(" {} {}b{}", opcode_name, condition ? "" : "!",
bool_constant_index);
break;
}
if (is_yield) {
out->Append(", Yield=true");
if (type == Type::kConditional) {
// For `exec` or `(p0) exec` (but not `cexec`), "unexpected token ','" if
// preceded by a comma.
out->Append(',');
}
out->Append(" Yield=true");
}
if (!clean) {
out->Append(" // PredicateClean=false");