[GPU] Ucode disasm: Fix exec formatting
This commit is contained in:
parent
69958cba9d
commit
df9a37f798
|
@ -141,25 +141,27 @@ void DisassembleSourceOperand(const InstructionOperand& op, StringBuffer* out) {
|
||||||
void ParsedExecInstruction::Disassemble(StringBuffer* out) const {
|
void ParsedExecInstruction::Disassemble(StringBuffer* out) const {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Type::kUnconditional:
|
case Type::kUnconditional:
|
||||||
out->AppendFormat(" {} ", opcode_name);
|
out->AppendFormat(" {}", opcode_name);
|
||||||
break;
|
break;
|
||||||
case Type::kPredicated:
|
case Type::kPredicated:
|
||||||
out->Append(condition ? " (p0) " : "(!p0) ");
|
out->Append(condition ? " (p0) " : "(!p0) ");
|
||||||
out->AppendFormat("{} ", opcode_name);
|
out->AppendFormat("{}", opcode_name);
|
||||||
break;
|
break;
|
||||||
case Type::kConditional:
|
case Type::kConditional:
|
||||||
out->AppendFormat(" {} ", opcode_name);
|
out->AppendFormat(" {} {}b{}", opcode_name, condition ? "" : "!",
|
||||||
if (!condition) {
|
bool_constant_index);
|
||||||
out->Append('!');
|
|
||||||
}
|
|
||||||
out->AppendFormat("b{}", bool_constant_index);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (is_yield) {
|
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) {
|
if (!clean) {
|
||||||
out->Append(" // PredicateClean=false");
|
out->Append(" // PredicateClean=false");
|
||||||
}
|
}
|
||||||
out->Append('\n');
|
out->Append('\n');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue