Pārlūkot izejas kodu

* restructured the the TExternalAssembler constructors so that the
hack for the Jasmin descendent is no longer needed

git-svn-id: trunk@34852 -

Jonas Maebe 8 gadi atpakaļ
vecāks
revīzija
74a49b5f91

+ 5 - 6
compiler/aarch64/agcpugas.pas

@@ -31,7 +31,7 @@ unit agcpugas;
     uses
     uses
        globtype,systems,
        globtype,systems,
        aasmtai,
        aasmtai,
-       aggas,
+       assemble,aggas,
        cpubase,cpuinfo;
        cpubase,cpuinfo;
 
 
     type
     type
@@ -40,11 +40,11 @@ unit agcpugas;
       end;
       end;
 
 
       TAArch64Assembler=class(TGNUassembler)
       TAArch64Assembler=class(TGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
       end;
       end;
 
 
       TAArch64AppleAssembler=class(TAppleGNUassembler)
       TAArch64AppleAssembler=class(TAppleGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
       end;
       end;
 
 
 
 
@@ -64,7 +64,6 @@ unit agcpugas;
 
 
     uses
     uses
        cutils,globals,verbose,
        cutils,globals,verbose,
-       assemble,
        aasmcpu,
        aasmcpu,
        itcpugas,
        itcpugas,
        cgbase,cgutils;
        cgbase,cgutils;
@@ -74,7 +73,7 @@ unit agcpugas;
 {                      AArch64 Assembler writer                              }
 {                      AArch64 Assembler writer                              }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TAArch64Assembler.create(info: pasminfo; smart: boolean);
+    constructor TAArch64Assembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := TAArch64InstrWriter.create(self);
         InstrWriter := TAArch64InstrWriter.create(self);
@@ -84,7 +83,7 @@ unit agcpugas;
 {                      Apple AArch64 Assembler writer                        }
 {                      Apple AArch64 Assembler writer                        }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TAArch64AppleAssembler.create(info: pasminfo; smart: boolean);
+    constructor TAArch64AppleAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := TAArch64InstrWriter.create(self);
         InstrWriter := TAArch64InstrWriter.create(self);

+ 5 - 6
compiler/arm/agarmgas.pas

@@ -31,12 +31,12 @@ unit agarmgas;
     uses
     uses
        globtype,systems,
        globtype,systems,
        aasmtai,
        aasmtai,
-       aggas,
+       assemble,aggas,
        cpubase,cpuinfo;
        cpubase,cpuinfo;
 
 
     type
     type
       TARMGNUAssembler=class(TGNUassembler)
       TARMGNUAssembler=class(TGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
         function MakeCmdLine: TCmdStr; override;
         function MakeCmdLine: TCmdStr; override;
         procedure WriteExtraHeader; override;
         procedure WriteExtraHeader; override;
       end;
       end;
@@ -48,7 +48,7 @@ unit agarmgas;
       end;
       end;
 
 
       TArmAppleGNUAssembler=class(TAppleGNUassembler)
       TArmAppleGNUAssembler=class(TAppleGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
         procedure WriteExtraHeader; override;
         procedure WriteExtraHeader; override;
       end;
       end;
 
 
@@ -82,7 +82,6 @@ unit agarmgas;
 
 
     uses
     uses
        cutils,globals,verbose,
        cutils,globals,verbose,
-       assemble,
        aasmcpu,
        aasmcpu,
        itcpugas,
        itcpugas,
        cgbase,cgutils;
        cgbase,cgutils;
@@ -91,7 +90,7 @@ unit agarmgas;
 {                         GNU Arm Assembler writer                           }
 {                         GNU Arm Assembler writer                           }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TArmGNUAssembler.create(info: pasminfo; smart: boolean);
+    constructor TArmGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := TArmInstrWriter.create(self);
         InstrWriter := TArmInstrWriter.create(self);
@@ -139,7 +138,7 @@ unit agarmgas;
 {                      GNU/Apple ARM Assembler writer                        }
 {                      GNU/Apple ARM Assembler writer                        }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TArmAppleGNUAssembler.create(info: pasminfo; smart: boolean);
+    constructor TArmAppleGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := TArmInstrWriter.create(self);
         InstrWriter := TArmInstrWriter.create(self);

+ 17 - 14
compiler/assemble.pas

@@ -156,6 +156,8 @@ interface
         function double2str(d : double) : string; virtual;
         function double2str(d : double) : string; virtual;
         function extended2str(e : extended) : string; virtual;
         function extended2str(e : extended) : string; virtual;
         Function DoPipe:boolean;
         Function DoPipe:boolean;
+
+        function CreateNewAsmWriter: TExternalAssemblerOutputFile; virtual;
       public
       public
 
 
         {# Returns the complete path and executable name of the assembler
         {# Returns the complete path and executable name of the assembler
@@ -185,8 +187,8 @@ interface
         {# Constructs the command line for calling the assembler }
         {# Constructs the command line for calling the assembler }
         function MakeCmdLine: TCmdStr; virtual;
         function MakeCmdLine: TCmdStr; virtual;
       public
       public
-        Constructor Create(info: pasminfo; smart: boolean);override;
-        Constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
+        Constructor Create(info: pasminfo; smart: boolean); override; final;
+        Constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); virtual;
         procedure MakeObject;override;
         procedure MakeObject;override;
         destructor Destroy; override;
         destructor Destroy; override;
 
 
@@ -737,27 +739,28 @@ Implementation
       end;
       end;
 
 
 
 
+    function TExternalAssembler.CreateNewAsmWriter: TExternalAssemblerOutputFile;
+      begin
+        result:=TExternalAssemblerOutputFile.Create(self);
+      end;
+
+
     Constructor TExternalAssembler.Create(info: pasminfo; smart: boolean);
     Constructor TExternalAssembler.Create(info: pasminfo; smart: boolean);
       begin
       begin
-        inherited;
-        if not assigned(fwriter) then
-          begin
-            fwriter:=TExternalAssemblerOutputFile.Create(self);
-            ffreewriter:=true;
-          end;
-        if SmartAsm then
-          begin
-            path:=FixPath(ChangeFileExt(AsmFileName,target_info.smartext),false);
-            CreateSmartLinkPath(path);
-          end;
+        CreateWithWriter(info,CreateNewAsmWriter,true,smart);
       end;
       end;
 
 
 
 
     constructor TExternalAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter,smart: boolean);
     constructor TExternalAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter,smart: boolean);
       begin
       begin
+        inherited Create(info,smart);
         fwriter:=wr;
         fwriter:=wr;
         ffreewriter:=freewriter;
         ffreewriter:=freewriter;
-        Create(info,smart);
+        if SmartAsm then
+          begin
+            path:=FixPath(ChangeFileExt(AsmFileName,target_info.smartext),false);
+            CreateSmartLinkPath(path);
+          end;
       end;
       end;
 
 
 
 

+ 3 - 4
compiler/avr/agavrgas.pas

@@ -31,7 +31,7 @@ unit agavrgas;
     uses
     uses
        globtype,systems,
        globtype,systems,
        aasmtai,aasmdata,
        aasmtai,aasmdata,
-       aggas,
+       assemble,aggas,
        cpubase;
        cpubase;
 
 
     type
     type
@@ -39,7 +39,7 @@ unit agavrgas;
       { TAVRGNUAssembler }
       { TAVRGNUAssembler }
 
 
       TAVRGNUAssembler=class(TGNUassembler)
       TAVRGNUAssembler=class(TGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
        function MakeCmdLine: TCmdStr; override;
        function MakeCmdLine: TCmdStr; override;
       end;
       end;
 
 
@@ -52,7 +52,6 @@ unit agavrgas;
 
 
     uses
     uses
        cutils,globals,verbose,
        cutils,globals,verbose,
-       assemble,
        aasmbase,aasmcpu,
        aasmbase,aasmcpu,
        itcpugas,
        itcpugas,
        cpuinfo,
        cpuinfo,
@@ -62,7 +61,7 @@ unit agavrgas;
 {                         GNU Arm Assembler writer                           }
 {                         GNU Arm Assembler writer                           }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TAVRGNUAssembler.create(info: pasminfo; smart: boolean);
+    constructor TAVRGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := TAVRInstrWriter.create(self);
         InstrWriter := TAVRInstrWriter.create(self);

+ 13 - 15
compiler/jvm/agjasmin.pas

@@ -69,8 +69,10 @@ interface
         procedure WriteSymtableVarSyms(st: TSymtable);
         procedure WriteSymtableVarSyms(st: TSymtable);
         procedure WriteSymtableProcdefs(st: TSymtable);
         procedure WriteSymtableProcdefs(st: TSymtable);
         procedure WriteSymtableStructDefs(st: TSymtable);
         procedure WriteSymtableStructDefs(st: TSymtable);
+
+        function CreateNewAsmWriter: TExternalAssemblerOutputFile; override;
        public
        public
-        constructor Create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
         function MakeCmdLine: TCmdStr;override;
         function MakeCmdLine: TCmdStr;override;
         procedure WriteTree(p:TAsmList);override;
         procedure WriteTree(p:TAsmList);override;
         procedure WriteAsmList;override;
         procedure WriteAsmList;override;
@@ -1083,21 +1085,17 @@ implementation
       end;
       end;
 
 
 
 
-    constructor TJasminAssembler.Create(info: pasminfo; smart: boolean);
+    function TJasminAssembler.CreateNewAsmWriter: TExternalAssemblerOutputFile;
       begin
       begin
-        { this is a bit dirty: the "main" constructor is is this one, which is
-          called by TExternalAssembler.CreateWithWriter(). That means the call
-          below to CreateWithWriter will end up here again when it calls create.
-          It will first initialise fwriter though, so we can check that field,
-          and otherwise call the inherited create }
-        if not assigned(writer) then
-          begin
-            CreateWithWriter(info,TJasminAssemblerOutputFile.Create(self),true,smart);
-            InstrWriter:=TJasminInstrWriter.Create(self);
-            asmfiles:=TCmdStrList.Create;
-          end
-        else
-          inherited;
+        Result:=TJasminAssemblerOutputFile.Create(self);
+      end;
+
+
+    constructor TJasminAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
+      begin
+        inherited;
+        InstrWriter:=TJasminInstrWriter.Create(self);
+        asmfiles:=TCmdStrList.Create;
       end;
       end;
 
 
 
 

+ 2 - 2
compiler/llvm/agllvm.pas

@@ -52,7 +52,7 @@ interface
         procedure WriteOrdConst(hp: tai_const);
         procedure WriteOrdConst(hp: tai_const);
         procedure WriteTai(const replaceforbidden: boolean; const do_line: boolean; var InlineLevel: cardinal; var asmblock: boolean; var hp: tai);
         procedure WriteTai(const replaceforbidden: boolean; const do_line: boolean; var InlineLevel: cardinal; var asmblock: boolean; var hp: tai);
        public
        public
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
         function MakeCmdLine: TCmdStr; override;
         function MakeCmdLine: TCmdStr; override;
         procedure WriteTree(p:TAsmList);override;
         procedure WriteTree(p:TAsmList);override;
         procedure WriteAsmList;override;
         procedure WriteAsmList;override;
@@ -1210,7 +1210,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor TLLVMAssember.create(info: pasminfo; smart: boolean);
+    constructor TLLVMAssember.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter:=TLLVMInstrWriter.create(self);
         InstrWriter:=TLLVMInstrWriter.create(self);

+ 2 - 2
compiler/m68k/ag68kgas.pas

@@ -32,7 +32,7 @@ interface
 
 
     type
     type
       Tm68kGNUAssembler=class(TGNUassembler)
       Tm68kGNUAssembler=class(TGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
         function MakeCmdLine : TCmdStr; override;
         function MakeCmdLine : TCmdStr; override;
       end;
       end;
 
 
@@ -58,7 +58,7 @@ interface
  {                         GNU m68k Assembler writer                          }
  {                         GNU m68k Assembler writer                          }
  {****************************************************************************}
  {****************************************************************************}
 
 
- constructor Tm68kGNUAssembler.create(info: pasminfo; smart: boolean);
+ constructor Tm68kGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
    begin
    begin
      inherited;
      inherited;
      InstrWriter := Tm68kInstrWriter.create(self);
      InstrWriter := Tm68kInstrWriter.create(self);

+ 4 - 4
compiler/m68k/ag68kvasm.pas

@@ -29,13 +29,13 @@ unit ag68kvasm;
     uses
     uses
        aasmbase,systems,
        aasmbase,systems,
        aasmtai,aasmdata,
        aasmtai,aasmdata,
-       aggas,ag68kgas,
+       assemble,aggas,ag68kgas,
        cpubase,cgutils,
        cpubase,cgutils,
        globtype;
        globtype;
 
 
   type
   type
     tm68kvasm = class(Tm68kGNUassembler)
     tm68kvasm = class(Tm68kGNUassembler)
-      constructor create(info: pasminfo; smart: boolean); override;
+      constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
       function MakeCmdLine: TCmdStr; override;
       function MakeCmdLine: TCmdStr; override;
     end;
     end;
 
 
@@ -44,7 +44,7 @@ unit ag68kvasm;
     uses
     uses
        cutils,cfileutl,globals,verbose,
        cutils,cfileutl,globals,verbose,
        cgbase,
        cgbase,
-       assemble,script,
+       script,
        itcpugas,cpuinfo,
        itcpugas,cpuinfo,
        aasmcpu;
        aasmcpu;
 
 
@@ -54,7 +54,7 @@ unit ag68kvasm;
 {****************************************************************************}
 {****************************************************************************}
 
 
 
 
-    constructor tm68kvasm.create(info: pasminfo; smart: boolean);
+    constructor tm68kvasm.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := Tm68kInstrWriter.create(self);
         InstrWriter := Tm68kInstrWriter.create(self);

+ 2 - 2
compiler/mips/cpugas.pas

@@ -32,7 +32,7 @@ unit cpugas;
     type
     type
       TMIPSGNUAssembler = class(TGNUassembler)
       TMIPSGNUAssembler = class(TGNUassembler)
         nomacro, noreorder, noat : boolean;
         nomacro, noreorder, noat : boolean;
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
         {# Constructs the command line for calling the assembler }
         {# Constructs the command line for calling the assembler }
         function MakeCmdLine: TCmdStr; override;
         function MakeCmdLine: TCmdStr; override;
       end;
       end;
@@ -69,7 +69,7 @@ unit cpugas;
 {                         GNU MIPS  Assembler writer                           }
 {                         GNU MIPS  Assembler writer                           }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TMIPSGNUAssembler.create(info: pasminfo; smart: boolean);
+    constructor TMIPSGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter:=TMIPSInstrWriter.create(self);
         InstrWriter:=TMIPSInstrWriter.create(self);

+ 4 - 4
compiler/powerpc/agppcvasm.pas

@@ -33,7 +33,7 @@ unit agppcvasm;
     uses
     uses
        aasmbase,systems,
        aasmbase,systems,
        aasmtai,aasmdata,
        aasmtai,aasmdata,
-       aggas,
+       assemble,aggas,
        cpubase,cgutils,
        cpubase,cgutils,
        globtype;
        globtype;
 
 
@@ -43,7 +43,7 @@ unit agppcvasm;
     end;
     end;
 
 
     TPPCVASM=class(TGNUassembler)
     TPPCVASM=class(TGNUassembler)
-      constructor create(info: pasminfo; smart: boolean); override;
+      constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
       function MakeCmdLine: TCmdStr; override;
       function MakeCmdLine: TCmdStr; override;
     end;
     end;
 
 
@@ -60,7 +60,7 @@ unit agppcvasm;
     uses
     uses
        cutils,cfileutl,globals,verbose,
        cutils,cfileutl,globals,verbose,
        cgbase,
        cgbase,
-       assemble,script,
+       script,
        itcpugas,cpuinfo,
        itcpugas,cpuinfo,
        aasmcpu;
        aasmcpu;
 
 
@@ -359,7 +359,7 @@ unit agppcvasm;
 {****************************************************************************}
 {****************************************************************************}
 
 
 
 
-    constructor TPPCVASM.create(info: pasminfo; smart: boolean);
+    constructor TPPCVASM.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := TPPCInstrWriter.create(self);
         InstrWriter := TPPCInstrWriter.create(self);

+ 7 - 12
compiler/ppcgen/agppcgas.pas

@@ -33,7 +33,7 @@ unit agppcgas;
     uses
     uses
        systems,aasmbase,
        systems,aasmbase,
        aasmtai,aasmdata,
        aasmtai,aasmdata,
-       aggas,
+       assemble,aggas,
        cpubase,cgutils,
        cpubase,cgutils,
        globtype;
        globtype;
 
 
@@ -43,18 +43,18 @@ unit agppcgas;
     end;
     end;
 
 
     TPPCGNUAssembler=class(TGNUassembler)
     TPPCGNUAssembler=class(TGNUassembler)
-      constructor create(info: pasminfo; smart: boolean); override;
+      constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
       function MakeCmdLine: TCmdStr; override;
       function MakeCmdLine: TCmdStr; override;
       procedure WriteExtraHeader; override;
       procedure WriteExtraHeader; override;
     end;
     end;
 
 
     TPPCAppleGNUAssembler=class(TAppleGNUassembler)
     TPPCAppleGNUAssembler=class(TAppleGNUassembler)
-      constructor create(info: pasminfo; smart: boolean); override;
+      constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
       function MakeCmdLine: TCmdStr; override;
       function MakeCmdLine: TCmdStr; override;
     end;
     end;
 
 
     TPPCAIXAssembler=class(TPPCGNUAssembler)
     TPPCAIXAssembler=class(TPPCGNUAssembler)
-      constructor create(info: pasminfo; smart: boolean); override;
+      constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
      protected
      protected
       function sectionname(atype: TAsmSectiontype; const aname: string; aorder: TAsmSectionOrder): string; override;
       function sectionname(atype: TAsmSectiontype; const aname: string; aorder: TAsmSectionOrder): string; override;
       procedure WriteExtraHeader; override;
       procedure WriteExtraHeader; override;
@@ -72,7 +72,6 @@ unit agppcgas;
     uses
     uses
        cutils,globals,verbose,
        cutils,globals,verbose,
        cgbase,
        cgbase,
-       assemble,
        itcpugas,cpuinfo,
        itcpugas,cpuinfo,
        aasmcpu;
        aasmcpu;
 
 
@@ -398,11 +397,9 @@ unit agppcgas;
 {                         GNU PPC Assembler writer                           }
 {                         GNU PPC Assembler writer                           }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TPPCGNUAssembler.create(info: pasminfo; smart: boolean);
+    constructor TPPCGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
-        if assigned(InstrWriter) then
-          InstrWriter.free;
         InstrWriter := TPPCInstrWriter.create(self);
         InstrWriter := TPPCInstrWriter.create(self);
       end;
       end;
 
 
@@ -440,11 +437,9 @@ unit agppcgas;
 {                      GNU/Apple PPC Assembler writer                        }
 {                      GNU/Apple PPC Assembler writer                        }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TPPCAppleGNUAssembler.create(info: pasminfo; smart: boolean);
+    constructor TPPCAppleGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
-        if assigned(InstrWriter) then
-          InstrWriter.free;
         InstrWriter := TPPCInstrWriter.create(self);
         InstrWriter := TPPCInstrWriter.create(self);
       end;
       end;
 
 
@@ -471,7 +466,7 @@ unit agppcgas;
 {                         AIX PPC Assembler writer                           }
 {                         AIX PPC Assembler writer                           }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TPPCAIXAssembler.create(info: pasminfo; smart: boolean);
+    constructor TPPCAIXAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := TPPCInstrWriter.create(self);
         InstrWriter := TPPCInstrWriter.create(self);

+ 2 - 2
compiler/sparc/cpugas.pas

@@ -32,7 +32,7 @@ interface
 
 
     type
     type
       TGasSPARC=class(TGnuAssembler)
       TGasSPARC=class(TGnuAssembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
         {# Constructs the command line for calling the assembler }
         {# Constructs the command line for calling the assembler }
         function MakeCmdLine: TCmdStr; override;
         function MakeCmdLine: TCmdStr; override;
       end;
       end;
@@ -54,7 +54,7 @@ implementation
 {                         GNU PPC Assembler writer                           }
 {                         GNU PPC Assembler writer                           }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    constructor TGasSPARC.create(info: pasminfo; smart: boolean);
+    constructor TGasSPARC.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := TSPARCInstrWriter.create(self);
         InstrWriter := TSPARCInstrWriter.create(self);

+ 6 - 6
compiler/x86/agx86att.pas

@@ -34,16 +34,16 @@ interface
 
 
     type
     type
       Tx86ATTAssembler=class(TGNUassembler)
       Tx86ATTAssembler=class(TGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
         function MakeCmdLine: TCmdStr; override;
         function MakeCmdLine: TCmdStr; override;
       end;
       end;
 
 
       Tx86AppleGNUAssembler=class(TAppleGNUassembler)
       Tx86AppleGNUAssembler=class(TAppleGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
       end;
       end;
 
 
       Tx86AoutGNUAssembler=class(TAoutGNUassembler)
       Tx86AoutGNUAssembler=class(TAoutGNUassembler)
-        constructor create(info: pasminfo; smart: boolean); override;
+        constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override;
       end;
       end;
 
 
 
 
@@ -76,7 +76,7 @@ interface
                             Tx86ATTAssembler
                             Tx86ATTAssembler
  ****************************************************************************}
  ****************************************************************************}
 
 
-    constructor Tx86ATTAssembler.create(info: pasminfo; smart: boolean);
+    constructor Tx86ATTAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := Tx86InstrWriter.create(self);
         InstrWriter := Tx86InstrWriter.create(self);
@@ -126,7 +126,7 @@ interface
                           Tx86AppleGNUAssembler
                           Tx86AppleGNUAssembler
  ****************************************************************************}
  ****************************************************************************}
 
 
-    constructor Tx86AppleGNUAssembler.create(info: pasminfo; smart: boolean);
+    constructor Tx86AppleGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := Tx86InstrWriter.create(self);
         InstrWriter := Tx86InstrWriter.create(self);
@@ -140,7 +140,7 @@ interface
                           Tx86AoutGNUAssembler
                           Tx86AoutGNUAssembler
  ****************************************************************************}
  ****************************************************************************}
 
 
-    constructor Tx86AoutGNUAssembler.create(info: pasminfo; smart: boolean);
+    constructor Tx86AoutGNUAssembler.CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean);
       begin
       begin
         inherited;
         inherited;
         InstrWriter := Tx86InstrWriter.create(self);
         InstrWriter := Tx86InstrWriter.create(self);