summaryrefslogtreecommitdiff
path: root/nvexec
blob: 0b6d0fed8ad83073c104ffc6d05e3135e9638299 (plain)
1
2
3
4
5
#!/bin/bash
sed -re 's/(\S+)\s*:\s*(\S+)/\1 \1_\2/; s/^\s*(\S+)\s+(\S+)\s*=(.*)$/printf("%u %u %u\\n", \1, \2, \3);/; 1s@^@#include <nouveau/nouveau_class.h>\n#include <stdio.h>\nint main(int argc, char** argv) {\n@; $ s/$/\nreturn 0;\n}/; ' "$@" > temp.c
gcc -o temp temp.c && ./temp > input.txt
sync
./nvexec_raw < input.txt