diff options
| author | RussianSanta12 <127607192+RussianSanta12@users.noreply.github.com> | 2026-12-02 13:01:04 -0500 |
|---|---|---|
| committer | RussianSanta12 <127607192+RussianSanta12@users.noreply.github.com> | 2026-12-02 13:01:04 -0500 |
| commit | 0497b4fc0460dd663fc8454d709bb968394070be (patch) | |
| tree | bda0160288341620c7897703961a1266aaeaf1af /runtime/test/queue_proxy_test.cpp | |
| parent | 45dc41f95c1cd0dcc29c2c50582e0e9af8a77259 (diff) | |
rdna2spirv: refuse a line with too few operands before lowering (D3D12-TRANSLATOR-MISSING-OPERAND)
A hand-written listing with a missing operand (a fixture typo) read past the end of its operand list somewhere
in Gen and ended in an IndexError, ValueError or TypeError traceback; Gen.insn converted that only when the line
had no operands at all. check_operand_counts now compares every parsed line with the operand count the decoder's
RDNA2 ISA tables (tools/rdna2_isa_tables.py) give its mnemonic, less the operands a listing may leave out (the
GFX10 v_cmpx destination, the VDST of a FLAT/GLOBAL/SCRATCH atomic without glc or a load with lds, the implicit
VCC of VOP2/VOPC), and raises Unsupported("<op>: expects N operands, got M"). NOOPS and mnemonics outside the
tables are not checked; internal errors still raise. LLVM prints every operand, so corpus listings are not
affected; of the 16 456 instruction lines in the repository's 393 .asm fixtures only one fails the check, a
branch to a label named "done" that shader_ir strips as a modifier (its test resolves labels before translating).
tests/semantic/test_insn_operand_count.py covers nine crash sites (Gen._insn, med3_f, compare, sop2_b32_srcs,
holds_lane_mask, scalar_load, buffer_address, lds_op) and the full and short forms that must still translate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/queue_proxy_test.cpp')
0 files changed, 0 insertions, 0 deletions