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
Eric Anholt
2d298742bf
Add support for register-indirect addressing in source operands.
2013-03-04 15:54:23 +00:00
Eric Anholt
3bcf6b29cd
Add support for register-indirect access in destination registers.
...
This is untested. Also, a few bits for source operand register-indirect access
sneak in with this commit.
2013-03-04 15:54:23 +00:00
Eric Anholt
2dac0a19a4
Add support for destination writemasks.
...
This involved changing dest operands to have their own structure like src
operands, as the destination writemask (which is align16-only) shares space
with register numbers in align1 mode.
2013-03-04 15:54:23 +00:00
Eric Anholt
de1a889fe3
Avoid shift/reduce conflict in predicate by making flagreg and subreg 1 token.
...
Thanks to keithp for pointing out where the conflict was.
2013-03-04 15:54:23 +00:00
Eric Anholt
0ed5d93cc2
Add support for predicate control.
...
This is untested on programs using predicate control, and also causes a
shift/reduce conflict.
2013-03-04 15:54:22 +00:00
Eric Anholt
6a88ada7e8
Add support for swizzle control on source operands.
...
This required restructuring to store source operands in a new structure rather
than being stored in instructions, as swizzle is align16-only and shares
storage with other fields for align1 mode.
These changes were not tested on real programs using swizzle.
2013-03-04 15:54:22 +00:00
Eric Anholt
2a0f135784
Add acc[01] as src operands.
2013-03-04 15:54:22 +00:00
Eric Anholt
edc82a045c
Comment cleanup and add missing semicolons after rules.
2013-03-04 15:54:22 +00:00
Eric Anholt
908f37d92d
Add support for more instruction options.
2013-03-04 15:54:22 +00:00
Eric Anholt
6db54d7465
Typo fix in comment.
2013-03-04 15:54:22 +00:00
Eric Anholt
1d7d04228e
Rename direct_gen_reg struct to direct_reg now that it fills more roles.
2013-03-04 15:54:22 +00:00
Eric Anholt
5297b2a7e8
Support src ARF operands in another place, and spell it arch instead of acc.
2013-03-04 15:54:22 +00:00
Eric Anholt
2c7876583e
Add support for more registers as source operands.
2013-03-04 15:54:22 +00:00
Eric Anholt
883408eab8
Add rules for more registers, and use some for destinations.
2013-03-04 15:54:22 +00:00
Eric Anholt
2cca382cd2
Rename the resulting binary to gen4asm instead of lextest.
2013-03-04 15:54:22 +00:00
Eric Anholt
c81a6084de
Add a negation that the initial disasm missed.
2013-03-04 15:54:22 +00:00
Eric Anholt
f914c6ace2
Add many more opcodes.
2013-03-04 15:54:22 +00:00
Eric Anholt
569990bf6b
Lex the register number with the register name.
...
This avoids the need for a start condition to prevent for example g1.8<0,1,0>UW
being lexed as GENREG NUMBER LANGLE etc. rather than
GENREG INTEGER DOT INTEGER LANGLE etc.
2013-03-04 15:54:22 +00:00
Eric Anholt
3d36079ae3
Add syntax for extended math send functions, and adjust packed_yuv_sf for it.
2013-03-04 15:54:22 +00:00