Browse Source

+ implemented the 'delegate' and the 'rethrow' instructions in the wasm internal assembler

Nikolay Nikolov 3 years ago
parent
commit
10db5ea5dc
1 changed files with 10 additions and 2 deletions
  1. 10 2
      compiler/wasm32/aasmcpu.pas

+ 10 - 2
compiler/wasm32/aasmcpu.pas

@@ -731,7 +731,9 @@ uses
                 end;
                 end;
             end;
             end;
           a_br,
           a_br,
-          a_br_if:
+          a_br_if,
+          a_rethrow,
+          a_delegate:
             begin
             begin
               if ops<>1 then
               if ops<>1 then
                 internalerror(2021092610);
                 internalerror(2021092610);
@@ -1417,13 +1419,19 @@ uses
                 end;
                 end;
             end;
             end;
           a_br,
           a_br,
-          a_br_if:
+          a_br_if,
+          a_rethrow,
+          a_delegate:
             begin
             begin
               case opcode of
               case opcode of
                 a_br:
                 a_br:
                   WriteByte($0C);
                   WriteByte($0C);
                 a_br_if:
                 a_br_if:
                   WriteByte($0D);
                   WriteByte($0D);
+                a_rethrow:
+                  WriteByte($09);
+                a_delegate:
+                  WriteByte($18);
                 else
                 else
                   internalerror(2021092622);
                   internalerror(2021092622);
               end;
               end;