mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-29 10:46:39 +01:00
Add OpBranch
This commit is contained in:
parent
48ddaf4913
commit
cdeeb9127c
2 changed files with 9 additions and 0 deletions
|
|
@ -30,6 +30,12 @@ Ref Module::Label() {
|
|||
return AddCode(spv::Op::OpLabel, bound++);
|
||||
}
|
||||
|
||||
Ref Module::Branch(Ref target_label) {
|
||||
Op* op{new Op(spv::Op::OpBranch)};
|
||||
op->Add(target_label);
|
||||
return AddCode(op);
|
||||
}
|
||||
|
||||
Ref Module::Return() {
|
||||
return AddCode(spv::Op::OpReturn);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue