Bläddra i källkod

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

git-svn-id: branches/wasm@46496 -
nickysn 5 år sedan
förälder
incheckning
6a89e2c1fa
2 ändrade filer med 29 tillägg och 0 borttagningar
  1. 1 0
      compiler/systems.inc
  2. 28 0
      compiler/wasm32/agllvmmc.pas

+ 1 - 0
compiler/systems.inc

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

+ 28 - 0
compiler/wasm32/agllvmmc.pas

@@ -27,7 +27,35 @@ unit agllvmmc;
 
 
 interface
 interface
 
 
+  uses
+    systems,
+    assemble;
+
+  type
+
+    { TLLVMMachineCodePlaygroundAssembler }
+
+    TLLVMMachineCodePlaygroundAssembler=class(texternalassembler)
+    end;
+
 implementation
 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.
 end.