From 4064694a5e438b10d71a24fe5d1d24bad40e4c48 Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Fri, 17 Sep 2021 02:15:56 +0300 Subject: [PATCH] + support writing the new tai_tagtype directive in the asm output --- compiler/aggas.pas | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/compiler/aggas.pas b/compiler/aggas.pas index ed587d2ea8..fc69c528e8 100644 --- a/compiler/aggas.pas +++ b/compiler/aggas.pas @@ -829,6 +829,29 @@ implementation if hp.extmodule='' then writer.AsmWriteLn(#9'.export_name '+hp.intname+', '+hp.extname); end; + + + procedure WriteTagType(hp: tai_tagtype); + var + wasm_basic_typ: TWasmBasicType; + first: boolean; + begin + writer.AsmWrite(#9'.tagtype'#9); + writer.AsmWrite(hp.tagname); + first:=true; + for wasm_basic_typ in hp.params do + begin + if first then + begin + first:=false; + writer.AsmWrite(' '); + end + else + writer.AsmWrite(','); + writer.AsmWrite(gas_wasm_basic_type_str[wasm_basic_typ]); + end; + writer.AsmLn; + end; {$endif WASM} var @@ -1625,6 +1648,8 @@ implementation WriteFuncTypeDirective(tai_functype(hp)); ait_importexport: WriteImportExport(tai_impexp(hp)); + ait_tagtype: + WriteTagType(tai_tagtype(hp)); {$endif WASM} else