Add version select and OpLogicalNot

This commit is contained in:
ReinUsesLisp 2018-11-02 13:38:33 -03:00
parent 4043020f45
commit 4f66fb18e9
3 changed files with 11 additions and 3 deletions

View file

@ -27,7 +27,7 @@ using Id = const Op*;
class Module {
public:
explicit Module();
explicit Module(std::uint32_t version = spv::Version);
~Module();
/**
@ -238,6 +238,11 @@ class Module {
/// Make an intermediate object whose value is undefined.
Id OpUndef(Id result_type);
// Logical
/// Result is true if Operand is false. Result is false if Operand is true.
Id OpLogicalNot(Id result_type, Id operand);
private:
Id AddCode(std::unique_ptr<Op> op);
@ -247,6 +252,8 @@ class Module {
Id AddAnnotation(std::unique_ptr<Op> op);
const std::uint32_t version;
std::uint32_t bound{1};
std::set<spv::Capability> capabilities;