Commit Graph

16 Commits

Author SHA1 Message Date
David Neto
2119694775 Disassembler support for OpSpecConstantOp
Document the fact that we use names for extended instructions
and OpSpecConstantOp opcode operands.
2015-11-11 12:12:07 -05:00
David Neto
f252985059 Fix description of NaN encoding. 2015-11-11 09:55:49 -05:00
David Neto
7c3ca6d05a syntax.md: Describe hex floats and their use. 2015-11-10 15:58:10 -05:00
Lei Zhang
0c00eb2cdf Remove canonical assembly format in syntax.md. 2015-11-10 15:57:56 -05:00
Andrew Woloszyn
f08c679e97 Removed un-needed comments and fixed merge issue. 2015-10-26 12:55:33 -04:00
Andrew Woloszyn
3e69cd1b9f Updated string escaping in the assembler.
Strings are now escaped correctly when assembling.
TODO dissassembler support for strange strings (newlines for example).
2015-10-26 12:55:33 -04:00
David Neto
78e677b5cd Parse and encode literal integers to the right width
Affects OpConstant, and OpSwitch.

Adds constant libspirv::kUnknownType for readability.

Adds tests for hexadecimal number parsing.

Updates syntax.md to describe hex parsing, including
sign extension.
2015-10-26 12:55:33 -04:00
David Neto
ee5104286f Remove stale TODO. Fix use of OpCode to 'instruction' 2015-10-26 12:55:33 -04:00
Dejan Mircevski
114206e0bc Clarify !<integer> parsing.
Implement some outstanding feedback from
Ic29c5a4a8178a62a5a1acad13d02f19cc1307097:

 - use "token" instead of "word" when referring to assembly text

 - specify how the numbers are parsed

Add a test for negative numbers.
2015-10-26 12:55:33 -04:00
Andrew Woloszyn
38acba2c3c Updated syntax.md to remove references to % numerical ids. 2015-10-26 12:55:33 -04:00
Andrew Woloszyn
13804e5d63 All values now represent symbolic names instead of mixed with numeric.
Also removed un-necessary heap-allocation of spv_named_id_table.
This removed the necessity to expose a function to create/destroy it
and simplified the interface.
2015-10-26 12:55:33 -04:00
David Neto
fbf5cf4591 Document the syntax of mask expressions 2015-10-26 12:55:33 -04:00
Dejan Mircevski
e3a19c0d63 Forbid !<integer> preceding or succeeding '='. 2015-10-26 12:55:33 -04:00
David Neto
8382de2670 Document inability to use names from 3.12, 1.13
You can't use names from 3.12 Image Channel Order and
3.13 Image Channel Data Type since in the intstruction grammar,
they are only used as return values, but never named arguments
to instructions.
2015-10-26 12:55:33 -04:00
David Neto
d7aa15ff16 Clarify the syntax. Some named enumerants are unusable
You can't use a named enumerant if it's only meaningful
in an operand supplied as an ID to a target instruction.
The place where you'd use the name is something like an
OpConstant, but there's not enough context to bring those
names into scope, unless you're willing to tolerate
potential collisions.

Occurs for the names in:
- 3.25 Memory Semantics
- 3.27 Scope ID
- 3.29 Kernel Enqueue Flags
- 3.30 Kernel Profiling Info
2015-10-26 12:55:33 -04:00
David Neto
2136ff70cc Move the syntax description into its own file 2015-10-26 12:55:33 -04:00