Added tracking to types and validated certain instructions.
authorAndrew Woloszyn <awoloszyn@google.com>
Tue, 29 Sep 2015 15:28:34 +0000 (11:28 -0400)
committerDavid Neto <dneto@google.com>
Mon, 26 Oct 2015 16:55:33 +0000 (12:55 -0400)
commit537e77663d9a9196509f112d09c880fd5fa0bf5b
treeb31eae0044ab5b2dada6e3f604155c5639017e9b
parent9db3a538974fa14dcc3d480d5d4288820b42e4e6
Added tracking to types and validated certain instructions.

We need to know how to generate correct SPIRV for cases like
OpConstant %int64 42 since the current parser will encode the 42 as a
32-bit value incorrectly.

This change is the first of a pair. This one tracks types, and makes
sure that OpConstant and OpSpecConstant are only ever called with
Integer or Float types, and OpSwitch is only called with integer
generating values.
15 files changed:
include/libspirv/libspirv.h
source/binary.cpp
source/instruction.h
source/opcode.cpp
source/opcode.h
source/text.cpp
source/text_handler.cpp
source/text_handler.h
test/AssemblyFormat.cpp
test/BinaryToText.cpp
test/ImmediateInt.cpp
test/TextToBinary.Constant.cpp
test/TextToBinary.ControlFlow.cpp
test/UnitSPIRV.h
test/ValidateID.cpp