2
0
Эх сурвалжийг харах

+ register a LLVM-MC assembler writer (not implemented yet)

git-svn-id: branches/wasm@46496 -
nickysn 5 жил өмнө
parent
commit
6a89e2c1fa

+ 1 - 0
compiler/systems.inc

@@ -263,6 +263,7 @@
              ,as_z80_vasm
              ,as_z80_rel
              ,as_wasm32_wabt
+             ,as_wasm32_llvm_mc        { WebAssembly code assembled by llvm-mc (llvm machine code playground) }
        );
 
        tlink = (ld_none,

+ 28 - 0
compiler/wasm32/agllvmmc.pas

@@ -27,7 +27,35 @@ unit agllvmmc;
 
 interface
 
+  uses
+    systems,
+    assemble;
+
+  type
+
+    { TLLVMMachineCodePlaygroundAssembler }
+
+    TLLVMMachineCodePlaygroundAssembler=class(texternalassembler)
+    end;
+
 implementation
 
+  const
+    as_wasm32_llvm_mc_info : tasminfo =
+       (
+         id     : as_wasm32_llvm_mc;
+         idtxt  : 'LLVM-MC';
+         asmbin : 'llvm-mc';
+         asmcmd : '--assemble --arch=wasm32 --filetype=obj -o $OBJ $EXTRAOPT $ASM';
+         supported_targets : [system_wasm32_wasm,system_wasm32_wasi];
+         flags : [];
+         labelprefix : '.L';
+         labelmaxlen : -1;
+         comment : '# ';
+         dollarsign : '$';
+       );
+
+initialization
+  RegisterAssembler(as_wasm32_llvm_mc_info,TLLVMMachineCodePlaygroundAssembler);
 end.