Browse Source

+ added TWASM32InstrWriter (not yet implemented)

git-svn-id: branches/wasm@46671 -
nickysn 5 years ago
parent
commit
0c366b33fd
1 changed files with 25 additions and 0 deletions
  1. 25 0
      compiler/wasm32/agllvmmc.pas

+ 25 - 0
compiler/wasm32/agllvmmc.pas

@@ -40,6 +40,14 @@ interface
     TLLVMMachineCodePlaygroundAssembler=class(TGNUassembler)
     TLLVMMachineCodePlaygroundAssembler=class(TGNUassembler)
     protected
     protected
       function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
       function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
+    public
+      constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
+    end;
+
+    { TWASM32InstrWriter }
+
+    TWASM32InstrWriter = class(TCPUInstrWriter)
+      procedure WriteInstruction(hp : tai);override;
     end;
     end;
 
 
 implementation
 implementation
@@ -51,12 +59,29 @@ implementation
 
 
   { TLLVMMachineCodePlaygroundAssembler }
   { TLLVMMachineCodePlaygroundAssembler }
 
 
+
   function TLLVMMachineCodePlaygroundAssembler.sectionname(atype: TAsmSectiontype; const aname: string; aorder: TAsmSectionOrder): string;
   function TLLVMMachineCodePlaygroundAssembler.sectionname(atype: TAsmSectiontype; const aname: string; aorder: TAsmSectionOrder): string;
     begin
     begin
       Result:=inherited sectionname(atype, aname, aorder)+',"",@';
       Result:=inherited sectionname(atype, aname, aorder)+',"",@';
     end;
     end;
 
 
 
 
+  constructor TLLVMMachineCodePlaygroundAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
+    begin
+      inherited;
+      InstrWriter:=TWASM32InstrWriter.create(self);
+    end;
+
+
+  { TWASM32InstrWriter }
+
+
+  procedure TWASM32InstrWriter.WriteInstruction(hp: tai);
+    begin
+      owner.writer.AsmWriteLn('# TODO: implement TWASM32InstrWriter.WriteInstruction');
+    end;
+
+
   const
   const
     as_wasm32_llvm_mc_info : tasminfo =
     as_wasm32_llvm_mc_info : tasminfo =
        (
        (