소스 검색

+ WebAssembly: insert a tai_local directive also for assembler functions

Nikolay Nikolov 1 년 전
부모
커밋
1a08d76ccb
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      compiler/wasm32/cpupi.pas

+ 9 - 1
compiler/wasm32/cpupi.pas

@@ -973,12 +973,20 @@ implementation
             vs.Free;
           end;
 
+        procedure postprocess_code_assembler;
+          begin
+            aktproccode.InsertAfter(tai_local.create([]),findfirst_tai_functype(aktproccode));
+          end;
+
       var
         localslist: TAsmList;
         labels_resolved, has_goto: Boolean;
       begin
         if po_assembler in procdef.procoptions then
-          exit;
+          begin
+            postprocess_code_assembler;
+            exit;
+          end;
         check_goto_br_instructions(aktproccode,has_goto);
 
         localslist:=prepare_locals;