SPIRV-Tools/source
David Neto 201caf7001 spv_operand_type_t cleanup.
- Concrete operand types are never optional.
  Split them to make this so, e.g. add SPV_OPERAND_TYPE_IMAGE
  since there was SPV_OPERAND_TYPE_OPTIONAL_IMAGE.
  Similarly for SPV_OPERAND_TYPE_MEMORY_ACCESS.
  This entails duplicating two operand table entries.

- The above, plus some rearranging of enums, allows us to define
  first and last optional operand types, and first and last
  variable operand types.
  This lets us simplify the code for spvOperandIsOptional, and
  spvOperandIsVariable.

- Replace SPV_OPERAND_TYPE_MULTIWORD_LITERAL_NUMBER with the
  more accurately named SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER.
  Its special characteristic is that the type of the literal
  number is determined by some previous operand in the instruction.
  This is used for literals in OpSwitch, OpConstant, and OpSpecConstant.
  This lets us refactor operand parsing cases in the assembler.

- Remove the special required-thing-in-optional-tuple in favour of
  the corresponding concrete operand type:
        SPV_OPERAND_TYPE_ID_IN_OPTIONAL_TUPLE
    --> SPV_OPERAND_TYPE_ID
        SPV_OPERAND_TYPE_INTEGER_LITERAL_IN_OPTIONAL_TUPLE
    --> SPV_OPERAND_TYPE_INTEGER_LITERAL

- Constrain spvOpeandTypeStr to only have to work for non-variable
  operand types.  Add a test for this.
2015-11-10 15:57:45 -05:00
..
assembly_grammar.cpp Refactor the binary parser. 2015-11-10 15:57:33 -05:00
assembly_grammar.h Refactor the binary parser. 2015-11-10 15:57:33 -05:00
binary.cpp spv_operand_type_t cleanup. 2015-11-10 15:57:45 -05:00
binary.h Refactor the binary parser. 2015-11-10 15:57:33 -05:00
diagnostic.cpp DiagnosticStream keeps a copy of the position. 2015-11-10 15:57:04 -05:00
diagnostic.h DiagnosticStream keeps a copy of the position. 2015-11-10 15:57:04 -05:00
disassemble.cpp spv_operand_type_t cleanup. 2015-11-10 15:57:45 -05:00
endian.cpp Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
endian.h Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
ext_inst.cpp Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
ext_inst.h Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
instruction.h Use spirv.h instead of spirv.hpp. 2015-11-02 13:52:20 -05:00
opcode.cpp spv_operand_type_t cleanup. 2015-11-10 15:57:45 -05:00
opcode.h Use the syntax table for opcode to name mappings. 2015-11-10 15:57:14 -05:00
opcode.inc Update core instruction syntax to Rev32 2015-10-26 12:55:33 -04:00
opencl_std_ext_inst.inc Add OpenCL extended instructions. 2015-10-26 12:55:33 -04:00
operand.cpp spv_operand_type_t cleanup. 2015-11-10 15:57:45 -05:00
operand.h spv_operand_type_t cleanup. 2015-11-10 15:57:45 -05:00
print.cpp Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
print.h Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
syntax_tables.patch Add OpenCL extended instructions. 2015-10-26 12:55:33 -04:00
text_handler.cpp Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
text_handler.h DiagnosticStream keeps a copy of the position. 2015-11-10 15:57:04 -05:00
text.cpp spv_operand_type_t cleanup. 2015-11-10 15:57:45 -05:00
text.h Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
validate_id.cpp Consolidate: spvOpcodeIsType into spvOpcodeGeneratesType 2015-11-10 15:56:54 -05:00
validate.cpp Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00
validate.h Run clang-format to enforce Google style globally. 2015-11-10 15:56:47 -05:00