upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/code_hooks_test.cpp
diff options
context:
space:
mode:
authorimShangLi <imShangLi@users.noreply.github.com>2026-12-02 16:41:49 +0800
committerimShangLi <imShangLi@users.noreply.github.com>2026-12-02 16:41:49 +0800
commit0ed295c761b50187ac8a0128e05d56da65a0031f (patch)
tree157d70efc7dfcc5da7f067ba990772ac73a032db /runtime/test/code_hooks_test.cpp
parent0ae5a2664b9cd2fd30abfb1f6096f1c07b030f39 (diff)
translator: a listing the translator cannot read is refused, not fatal
An operand the parser did not understand (`tools/shader_ir.py` leaves it raw) ended the translation with a `KeyError` where the op reads that operand as a register (an address, a data register), and a modifier whose value is not a bit ended it with a `ValueError`. What the translator does not model is reported (`Unsupported`), never guessed, so both are refused by name now: the operand at the dispatch boundary (`Gen.insn`), the modifier where it is read. The `op_sel:[...]`, `op_sel_hi:[...]` and `neg_lo:[...]` modifiers were read with `int()` in nine places, each failing on a value that is not a bit; they are read in one place now (`modifier_bits`), which refuses the modifier instead. The `swizzle(...)` modifier's arguments are refused the same way. CPU-checked by `tests/semantic/test_translator_unreadable.py`: an unreadable operand in the destination, a source and an address position, an unreadable modifier value, and one operand of one instruction of every fixture in `tests/semantic/fixtures/disasm/` replaced by text the parser cannot read (seeded, 0.5 s).
Diffstat (limited to 'runtime/test/code_hooks_test.cpp')
0 files changed, 0 insertions, 0 deletions