Name Date Size #Lines LOC

..--

README.mdH A D25-Apr-20252.1 KiB2519

check_output.pyH A D25-Apr-202517 KiB514436

framework.hH A D25-Apr-20252.2 KiB6650

glsl_scraper.pyH A D25-Apr-202511.7 KiB340265

helpers.cppH A D25-Apr-202539.5 KiB1,2171,029

helpers.hH A D25-Apr-20256.1 KiB179142

main.cppH A D25-Apr-20257.3 KiB292236

meson.buildH A D25-Apr-20251.7 KiB6560

test_assembler.cppH A D25-Apr-202563.1 KiB1,416748

test_builder.cppH A D25-Apr-20253.8 KiB10221

test_d3d11_derivs.cppH A D25-Apr-202524.6 KiB630342

test_hard_clause.cppH A D25-Apr-20259.5 KiB344182

test_insert_nops.cppH A D25-Apr-202579.1 KiB1,899925

test_insert_waitcnt.cppH A D25-Apr-202523.1 KiB535288

test_isel.cppH A D25-Apr-202535.7 KiB1,150549

test_lower_subdword.cppH A D25-Apr-20255.3 KiB14346

test_optimizer.cppH A D25-Apr-202577.1 KiB2,045899

test_optimizer_postRA.cppH A D25-Apr-202537.3 KiB938448

test_reduce_assign.cppH A D25-Apr-20251.5 KiB5222

test_regalloc.cppH A D25-Apr-202523.5 KiB623322

test_scheduler.cppH A D25-Apr-20256.9 KiB15691

test_sdwa.cppH A D25-Apr-202526.4 KiB560281

test_tests.cppH A D25-Apr-20251.4 KiB6134

test_to_hw_instr.cppH A D25-Apr-202537.1 KiB774333

README.md

1Tests are wrapped in a `BEGIN_TEST`/`END_TEST` and write data to the `output` file pointer. Tests have checks against the output. They are single line comments prefixed with certain characters:
2
3- `!` fails the test if the current line does not match the pattern
4- `>>` skips to the first line which matches the pattern, or fails the test if there is none
5- `;` executes python code to extend the pattern syntax by inserting functions into the variable dictionary, fail the test, insert more checks or consume characters from the output
6
7Before this prefix, there can be a `~` to only perform the check for certain
8variants (a regex directly following the `~` is used).
9
10# Pattern Syntax
11Patterns can define variables which can be accessed in both python code and the pattern itself. These are useful for readability or dealing with unstable identifiers in the output. Variable identifiers are sequences of digits, ascii letters or `_` (though they cannot start with a digit).
12
13- `\` can be used to match the following literal character without interpreting it.
14- Most characters expect the same characters in the output.
15- A sequence of spaces in the pattern expects a sequence of spaces or tabs in the output.
16- A `#` in the pattern expects an unsigned integer in the output. The `#` can be followed by an identifier to store the integer in a variable.
17- A `$` in the pattern stores the output until the first whitespace character into a variable.
18- A `%` in the pattern followed by an identifier is the same as a `#` but it expects a `%` before the integer in the output. It basically matches a ACO temporary.
19- A `@` calls a variable as a function. It can be followed by an argument string wrapped in `(` and `)`.
20
21# Functions
22- `s64`, `s96`, `s128`, `v2`, `v3`, etc, expand to a pattern which matches a disassembled instruction's definition or operand. It later checks that the size and alignment is what's expected.
23- `match_func` expands to a sequence of `$` and inserts functions with expand to the extracted output
24- `search_re` consumes the rest of the line and fails the test if the pattern is not found
25