+ implemented the br and br_if instructions in the wasm internal asm

This commit is contained in:
Nikolay Nikolov 2021-09-26 07:58:59 +03:00
parent ca70cb05a7
commit 2e491d1ffa

View File

@ -711,6 +711,20 @@ uses
internalerror(2021092611);
end;
end;
a_br,
a_br_if:
begin
if ops<>1 then
internalerror(2021092610);
with oper[0]^ do
case typ of
top_const:
result:=1+
UlebSize(val);
else
internalerror(2021092625);
end;
end;
else
internalerror(2021092623);
end;
@ -1357,6 +1371,25 @@ uses
internalerror(2021092611);
end;
end;
a_br,
a_br_if:
begin
case opcode of
a_br:
WriteByte($0C);
a_br_if:
WriteByte($0D);
end;
if ops<>1 then
internalerror(2021092610);
with oper[0]^ do
case typ of
top_const:
WriteUleb(val);
else
internalerror(2021092625);
end;
end;
else
internalerror(2021092624);
end;