GFX10 operand fields and SP3 text; FSSM wave size

Decode the operand fields of every GFX10 encoding (Instruction::fields)
and print them in SP3 syntax (Instruction::text, shader-info --disasm).
Read the wave size from the FSSM stage record flags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MarvisandClaude Opus 5.5 committed 2026-11-23 01:43:34 +01:00
1 parent f4504f6413
commit 12caefe804
5 files changed
+1626 -10

No files matched your search

+7 -5
View File
@@ -76,7 +76,9 @@ pub fn run(paths: Vec<PathBuf>, verbose: bool, disasm: bool) -> Result<()> {
*t.unnamed.entry(key).or_default() += 1;
}
if disasm {
listing.extend(insts.iter().map(format_instruction));
listing.extend(
insts.iter().map(|i| format_instruction(i, n.wave64)),
);
}
}
Err(e) => {
@@ -166,11 +168,11 @@ pub fn run(paths: Vec<PathBuf>, verbose: bool, disasm: bool) -> Result<()> {
Ok(())
}
fn format_instruction(i: &Instruction) -> String {
fn format_instruction(i: &Instruction, wave64: bool) -> String {
let words: Vec<_> = i.words.iter().map(|w| format!("{w:08X}")).collect();
let name = match i.name() {
Some(n) => n.to_owned(),
let text = match i.name() {
Some(_) => i.text(wave64),
None => format!("<{:?} {:#x}>", i.encoding, i.opcode),
};
format!(" {:06x}: {:<44} {name}", i.offset, words.join(" "))
format!(" {:06x}: {:<44} {text}", i.offset, words.join(" "))
}