Commit Graph

76 Commits

Author SHA1 Message Date
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 713db8b220 More renaming of gen4asm -> intel-gen4asm, plus README update. 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 4ee9c3d869 Add 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 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 1f58efa747 Add support for the WAIT instruction. 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 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 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 78cb82a1e2 Add some masks in comments that will help with writing tests. 2013-03-04 15:54:24 +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