• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

README.mdH A D23-Nov-20201.7 KiB2015

check_output.pyH A D23-Nov-202017.4 KiB513423

framework.hH A D23-Nov-20202.4 KiB7137

glsl_scraper.pyH A D23-Nov-202011.7 KiB340265

helpers.cppH A D23-Nov-202027.3 KiB776647

helpers.hH A D23-Nov-20205.1 KiB154103

main.cppH A D23-Nov-20207.7 KiB291223

meson.buildH A D23-Nov-20202.4 KiB6457

test_assembler.cppH A D23-Nov-20201.6 KiB4210

test_isel.cppH A D23-Nov-20203.2 KiB8340

test_optimizer.cppH A D23-Nov-20203.7 KiB8325

test_tests.cppH A D23-Nov-20202.4 KiB7934

test_to_hw_instr.cppH A D23-Nov-202019.2 KiB387150

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