|
@@ -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 =
|
|
(
|
|
(
|