mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-12-22 14:15:40 +00:00
Add OpUnreachable
This commit is contained in:
parent
84fab90024
commit
f1cccfd0f3
|
@ -292,6 +292,9 @@ public:
|
|||
/// Returns with no value from a function with void return type.
|
||||
void OpReturn();
|
||||
|
||||
/// Behavior is undefined if this instruction is executed.
|
||||
void OpUnreachable();
|
||||
|
||||
/// Return a value from a function.
|
||||
Id OpReturnValue(Id value);
|
||||
|
||||
|
|
|
@ -67,6 +67,11 @@ void Module::OpReturn() {
|
|||
*code << spv::Op::OpReturn << EndOp{};
|
||||
}
|
||||
|
||||
void Module::OpUnreachable() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpUnreachable << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpReturnValue(Id value) {
|
||||
code->Reserve(2);
|
||||
return *code << spv::Op::OpReturnValue << value << EndOp{};
|
||||
|
|
Loading…
Reference in a new issue