mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 21:09:24 +02:00
+ implemented the br and br_if instructions in the wasm internal asm
This commit is contained in:
parent
ca70cb05a7
commit
2e491d1ffa
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user