瀏覽代碼

+ support the CALL instruction in TWasmValidationStacks.Validate

Nikolay Nikolov 1 年之前
父節點
當前提交
81d98f5ae2
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      compiler/wasm32/aasmcpu.pas

+ 9 - 0
compiler/wasm32/aasmcpu.pas

@@ -974,6 +974,15 @@ uses
               PopVal(FGetLocalType(GetLocalIndex));
               PushVal(FGetLocalType(GetLocalIndex));
             end;
+          a_call:
+            begin
+              if a.ops<>2 then
+                internalerror(2024022501);
+              if a.oper[1]^.typ<>top_functype then
+                internalerror(2024022502);
+              PopVals(a.oper[1]^.functype.params);
+              PushVals(a.oper[1]^.functype.results);
+            end;
           a_call_indirect:
             begin
               if a.ops<>1 then