mirror of
https://gitee.com/openharmony/third_party_spirv-tools
synced 2024-12-12 01:44:24 +00:00
201caf7001
- 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. |
||
---|---|---|
.. | ||
assembly_grammar.cpp | ||
assembly_grammar.h | ||
binary.cpp | ||
binary.h | ||
diagnostic.cpp | ||
diagnostic.h | ||
disassemble.cpp | ||
endian.cpp | ||
endian.h | ||
ext_inst.cpp | ||
ext_inst.h | ||
instruction.h | ||
opcode.cpp | ||
opcode.h | ||
opcode.inc | ||
opencl_std_ext_inst.inc | ||
operand.cpp | ||
operand.h | ||
print.cpp | ||
print.h | ||
syntax_tables.patch | ||
text_handler.cpp | ||
text_handler.h | ||
text.cpp | ||
text.h | ||
validate_id.cpp | ||
validate.cpp | ||
validate.h |