parse_line() split the mnemonic from its operands at the first space, so
"s_mov_b32<TAB>s3, 1" made "s_mov_b32\ts3," the opcode and dropped s3 from
the operands. The split is now on any whitespace.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep VOP3 FP source modifiers (neg(...), |...|, -|...|, abs(...), and nested combinations) as abs/neg flags on imm and fimm operands instead of applying two's-complement integer negation or folding outer '-' before FAbs, matching LLVM AMDGPUInstPrinter::printOperandAndFPInputMods.
Plain signed numeric literals (-1, -1.0, 0x10) keep their existing dict layout. Also handle -0x... inside modifiers, preserve abs on sext(...), and apply abs then neg in tools/shader_meta.py::_imm_u32.
Verified on CPU with tests/test_shader_ir.py, tests/test_shader_meta.py, tests/test_cpu_ref.py, tools/f32_fuzz.py and the full tests/semantic suite (1,027 tests).
Run with no arguments it stopped with IndexError, `--limit x` with ValueError, and a missing path or a file
where a folder was expected with a traceback from os.listdir. It now has a usage line: src must be a folder,
and --limit takes a whole number of at least 1. The documented `shader_ir.py <dir> [--limit N]` form is
unchanged.
Tests: CliInputTest in tests/test_shader_ir.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shader_ir.py is the parser both the translator and cpu_ref read listings
with, and the only assertions on it covered two scalar-load lines. These
cases cover every operand form, the modifier list, split_args nesting and
parse_file's pc stepping, so a parser regression fails here first.