Commit Graph

295 Commits

Author SHA1 Message Date
Xiang, Haihao 60cf6e09dd the offset of JMPI is in unit of 64bits on GEN5.
This fix is only applied for JMPI label. It is up to you
to use a right offset for JMPI imm32|reg in your program.
2013-03-04 15:54:26 +00:00
Xiang, Haihao 5261b8475e change read message format on GEN5
to re-use a lot of shaders for GEN5.
2013-03-04 15:54:26 +00:00
Xiang Haihao 549b751afb Add support for GEN5
Add a new option [-g n], n=4(GEN4),5(GEN5). If don't use -g,
the default value is 4(GEN4)
2013-03-04 15:54:26 +00:00
Zou Nanhai be9bcee15f Add support for labeled and conditional branches
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-04 15:54:26 +00:00
Keith Packard 5a2ec836e1 Support more addressing modes in disasm 2013-03-04 15:54:26 +00:00
Eric Anholt d866fff116 Fix compiler warning from missing include. 2013-03-04 15:54:26 +00:00
Zou Nan hai 807f8768e9 Add support for dp_read message. 2013-03-04 15:54:26 +00:00
Zou Nan hai 26afe90126 Add thread_spawner message target support. 2013-03-04 15:54:26 +00:00
Keith Packard 2033aea3dd Add conditional support to assembler. Add align16 dest support to disasm.
This is working towards round-tripping mesa programs. Still need indirect
register addressing and align16 source support.
2013-03-04 15:54:26 +00:00
Keith Packard d8057c9bcd Add math and urb units, deal with nop 2013-03-04 15:54:26 +00:00
Keith Packard ae85b10cf0 Add disassembler (intel-gen4disasm).
Decodes most simple instructions. Still needs work on branching and send.
2013-03-04 15:54:26 +00:00
Keith Packard 082fbe8738 Support #line directives 2013-03-04 15:54:25 +00:00
Keith Packard b81aca4948 Ensure that parse errors cause non-zero exit.
Also, avoid creating output file when a parse error occurs
2013-03-04 15:54:25 +00:00
Keith Packard 2d4d401d70 Add packed vector immediate values 2013-03-04 15:54:25 +00:00
Keith Packard 3fd6e2fc7b Add GCC warnings 2013-03-04 15:54:25 +00:00
Eric Anholt 6e4b04a807 Add accidentally forgotten rnde test. 2013-03-04 15:54:25 +00:00
Eric Anholt 713db8b220 More renaming of gen4asm -> intel-gen4asm, plus README update. 2013-03-04 15:54:25 +00:00
Eric Anholt 09bf91ea75 Update .gitignore for gen4asm -> intel-gen4asm 2013-03-04 15:54:25 +00:00
Eric Anholt a1170c5e64 Rename package and binary to intel-gen4asm. 2013-03-04 15:54:25 +00:00
Eric Anholt a6d95cc0ce Use 0 instead of INITIAL, as the chosen lex on my debian doesn't supply it. 2013-03-04 15:54:25 +00:00
Eric Anholt 09d8be4117 Use inttypes.h to get at uint32_t instead of sys/types.h. 2013-03-04 15:54:25 +00:00
Eric Anholt 6be3ba4157 Update the TODO with more tasks and a bit more description. 2013-03-04 15:54:25 +00:00
Eric Anholt 4ee9c3d869 Add break, cont, and halt instructions. 2013-03-04 15:54:25 +00:00
Eric Anholt 9201e4e2a0 Add tests for break, cont, and halt instructions. 2013-03-04 15:54:25 +00:00
Eric Anholt f45ac8b2cc Fix the exitcode type for ENDIF to be D instead of UD.
Fixes the endif test.
2013-03-04 15:54:25 +00:00
Eric Anholt 7c3ba4d49d Add a test for ENDIF, revealing issues. 2013-03-04 15:54:24 +00:00
Eric Anholt 960ca001ca Fix initialization of null reg for ELSE, and set the pop count right.
This fixes the ELSE test.
2013-03-04 15:54:24 +00:00
Eric Anholt a8eb735270 Add a test for the ELSE instruction, revealing issues. 2013-03-04 15:54:24 +00:00
Eric Anholt 1f58efa747 Add support for the WAIT instruction. 2013-03-04 15:54:24 +00:00
Eric Anholt 055be60abf Add a test for wait instruction (not yet implemented). 2013-03-04 15:54:24 +00:00
Eric Anholt d1b8791928 Lex integers as unsigned long instead of signed int, fixing the immediate test. 2013-03-04 15:54:24 +00:00
Eric Anholt d72f5c9828 Add a failing test for maximum ranges of UD/D immediates. 2013-03-04 15:54:24 +00:00
Eric Anholt 330903ad81 Parse negative integers for imm32s, and don't exceed the IP count width field.
This fixes the while test.
2013-03-04 15:54:24 +00:00
Eric Anholt d538dfc462 Fix the width of the IP count field expected by the while test. 2013-03-04 15:54:24 +00:00
Eric Anholt 892d6e7ed0 Fix copy'n'paste-o in lexing of the WHILE instruction. 2013-03-04 15:54:24 +00:00
Eric Anholt 56cdee41af Initialize the structure used for setting up the ip src/dst in branches/jumps.
This fixes jmpi, if, and iff.  The while test still fails to compile.
2013-03-04 15:54:24 +00:00
Eric Anholt 8828725dc9 Add tests for jmpi, if, iff, and while, revealing issues. 2013-03-04 15:54:24 +00:00
Eric Anholt cc865f1bc0 Explain why rnde-intsrc is expected to fail. 2013-03-04 15:54:24 +00:00
Eric Anholt 78cb82a1e2 Add some masks in comments that will help with writing tests. 2013-03-04 15:54:24 +00:00
Eric Anholt b6fe4bbe2e Add configure.lineno to ignores. 2013-03-04 15:54:24 +00:00
Eric Anholt 863cd6a5b7 Add more unary operation tests. 2013-03-04 15:54:23 +00:00
Eric Anholt e3cc73bec4 Start adding a test suite. 2013-03-04 15:54:23 +00:00
Eric Anholt 356ce76d44 Add a rule for the ELSE instruction.
Untested.
2013-03-04 15:54:23 +00:00
Eric Anholt 1e907c7aed Add rules for branch and jump instructions.
Untested.
2013-03-04 15:54:23 +00:00
Eric Anholt d77712994d Add DO and ENDIF instructions. 2013-03-04 15:54:23 +00:00
Eric Anholt 74c81af3dd Fix a compiler warning by defining struct {in,}direct_reg at the top level. 2013-03-04 15:54:23 +00:00
Eric Anholt cc05ba1d9e Fix gram.h creation, fixing dependencies and distcheck. 2013-03-04 15:54:23 +00:00
Eric Anholt c8939edc28 Fix issues in the grammar that caused errors in bison. 2013-03-04 15:54:23 +00:00
Eric Anholt 9b40c3724a Add autotools build system, and rearrange directory layout. 2013-03-04 15:54:23 +00:00
Eric Anholt 5fbc399062 Add input/output file command line arguments. 2013-03-04 15:54:23 +00:00