瀏覽代碼

* remove ifdef fpc

git-svn-id: trunk@4819 -
peter 19 年之前
父節點
當前提交
d07f470b71

+ 0 - 4
compiler/aggas.pas

@@ -801,11 +801,7 @@ implementation
                if do_line then
                 AsmWriteLn(target_asm.comment+'value: '+extended2str(tai_comp_64bit(hp).value));
                AsmWrite(#9'.byte'#9);
-{$ifdef FPC}
                co:=comp(tai_comp_64bit(hp).value);
-{$else}
-               co:=tai_comp_64bit(hp).value;
-{$endif}
                { swap the values to correct endian if required }
                if source_info.endian <> target_info.endian then
                  swap64bitarray(t64bitarray(co));

+ 5 - 5
compiler/aoptobj.pas

@@ -488,10 +488,10 @@ Unit AoptObj;
                (Not(Assigned(Ref.Symbol)) or
                 (Ref.base = R_NO)) Then
         { local variable which is not an array }
-              RefsEq := {$ifdef fpc}@{$endif}RefsEqual
+              RefsEq := @RefsEqual
             Else
         { local variable which is an array }
-              RefsEq := {$ifdef fpc}@{$endif}ArrayRefsEq;
+              RefsEq := @ArrayRefsEq;
       {write something to a parameter, a local or global variable, so
          * with uncertain optimizations on:
             - destroy the contents of registers whose contents have somewhere a
@@ -714,7 +714,7 @@ Unit AoptObj;
               (Counter <= Content.NrOfMods) Do
           Begin
             If (p.typ = ait_instruction) And
-               RefInInstruction(Ref, p, {$ifdef fpc}@{$endif}references_equal)
+               RefInInstruction(Ref, p, @references_equal)
               Then TmpResult := True;
             Inc(Counter);
             GetNextInstruction(p,p)
@@ -1055,9 +1055,9 @@ Unit AoptObj;
                                       taicpu(p).condition:=inverse_cond(taicpu(p).condition);
                                       tai_label(hp2).labsym.decrefs;
                                       taicpu(p).oper[0]^.ref^.symbol:=taicpu(hp1).oper[0]^.ref^.symbol;
-                                      { when freeing hp1, the reference count 
+                                      { when freeing hp1, the reference count
                                         isn't decreased, so don't increase
- 
+
                                        taicpu(p).oper[0]^.ref^.symbol.increfs;
                                       }
 {$ifdef SPARC}

+ 7 - 12
compiler/browcol.pas

@@ -30,11 +30,6 @@ uses
   cclasses,
   symconst,symtable;
 
-{$ifndef FPC}
-  type
-    sw_integer = integer;
-{$endif FPC}
-
 const
   SymbolTypLen : integer = 6;
 
@@ -262,7 +257,7 @@ uses
 {$IFDEF USE_SYSUTILS}
   SysUtils,
 {$ELSE USE_SYSUTILS}
-  Dos,{$ifndef FPC}strings,{$endif}
+  Dos,
 {$ENDIF USE_SYSUTILS}
 {$ifdef DEBUG}
   verbose,
@@ -1601,7 +1596,7 @@ end;
   end;
 
 function SearchModule(const Name: string): PModuleSymbol;
-function Match(P: PModuleSymbol): boolean; {$ifndef FPC}far;{$endif}
+function Match(P: PModuleSymbol): boolean;
 begin
   Match:=CompareText(P^.GetName,Name)=0;
 end;
@@ -1899,7 +1894,7 @@ end;
 var
   oldexit : pointer;
 
-procedure browcol_exit;{$ifndef FPC}far;{$endif}
+procedure browcol_exit;
 begin
   exitproc:=oldexit;
   DisposeBrowserCol;
@@ -2035,11 +2030,11 @@ end;
 function LoadBrowserCol(S: PStream): boolean;
 var PD: PPointerDictionary;
 procedure FixupPointers;
-procedure FixupReference(P: PReference); {$ifndef FPC}far;{$endif}
+procedure FixupReference(P: PReference);
 begin
   PD^.Resolve(P^.FileName);
 end;
-procedure FixupSymbol(P: PSymbol); {$ifndef FPC}far;{$endif}
+procedure FixupSymbol(P: PSymbol);
 var I: sw_integer;
 begin
   PD^.Resolve(P^.DType);
@@ -2057,7 +2052,7 @@ end;
 begin
   Modules^.ForEach(@FixupSymbol);
 end;
-procedure ReadSymbolPointers(P: PSymbol); {$ifndef FPC}far;{$endif}
+procedure ReadSymbolPointers(P: PSymbol);
 var I: sw_integer;
     PV: pointer;
 begin
@@ -2101,7 +2096,7 @@ begin
 end;
 
 function StoreBrowserCol(S: PStream) : boolean;
-procedure WriteSymbolPointers(P: PSymbol); {$ifndef FPC}far;{$endif}
+procedure WriteSymbolPointers(P: PSymbol);
 var I: sw_integer;
 begin
   S^.Write(P, SizeOf(P));

+ 0 - 4
compiler/browlog.pas

@@ -154,11 +154,7 @@ implementation
          else
            begin
              buf[bufidx]:=#0;
-{$ifdef FPC}
              write(stderr,buf);
-{$else FPC}
-             write(buf);
-{$endif FPC}
            end;
         bufidx:=0;
       end;

+ 0 - 24
compiler/cmsgs.pas

@@ -144,30 +144,6 @@ end;
 
 
 function TMessage.LoadExtern(const fn:string):boolean;
-
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
 const
   bufsize=8192;
 var

+ 3 - 9
compiler/comphook.pas

@@ -330,14 +330,12 @@ begin
   { Display line }
   if ((status.verbosity and (Level and V_LevelMask))=(Level and V_LevelMask)) then
    begin
-{$ifdef FPC}
      if status.use_stderr then
       begin
         writeln(stderr,hs);
         flush(stderr);
       end
      else
-{$endif}
       begin
         if status.use_redir then
          writeln(status.redirfile,hs)
@@ -348,10 +346,8 @@ begin
   { include everything in the bugreport file }
   if status.use_bugreport then
    begin
-{$ifdef FPC}
      Write(status.reportbugfile,hexstr(level,8)+':');
      Writeln(status.reportbugfile,hs);
-{$endif}
    end;
 end;
 
@@ -360,11 +356,9 @@ function def_internalerror(i : longint) : boolean;
 begin
   do_comment(V_Fatal+V_LineInfo,'Internal error '+tostr(i));
 {$ifdef EXTDEBUG}
-  {$ifdef FPC}
-    { Internalerror() and def_internalerror() do not
-      have a stackframe }
-    dump_stack(stdout,get_caller_frame(get_frame));
-  {$endif FPC}
+  { Internalerror() and def_internalerror() do not
+    have a stackframe }
+  dump_stack(stdout,get_caller_frame(get_frame));
 {$endif EXTDEBUG}
   def_internalerror:=true;
 end;

+ 5 - 111
compiler/compiler.pas

@@ -24,119 +24,15 @@ unit compiler;
 
 {$i fpcdefs.inc}
 
-{$ifdef FPC}
-   { One of Alpha, I386 or M68K must be defined }
-   {$UNDEF CPUOK}
-
-   {$ifdef I386}
-   {$define CPUOK}
-   {$endif}
-
-   {$ifdef M68K}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif}
-   {$endif}
-
-   {$ifdef alpha}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif}
-   {$endif}
-
-   {$ifdef vis}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif}
-   {$endif}
-
-
-   {$ifdef powerpc}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif}
-   {$endif}
-
-   {$ifdef POWERPC64}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif}
-   {$endif}
-
-   {$ifdef ia64}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif}
-   {$endif}
-
-   {$ifdef SPARC}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif}
-   {$endif}
-
-   {$ifdef x86_64}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif}
-   {$endif}
-
-   {$ifdef ARM}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif ARM}
-   {$endif ARM}
-
-
-   {$ifdef MIPS}
-   {$ifndef CPUOK}
-   {$DEFINE CPUOK}
-   {$else}
-     {$fatal cannot define two CPU switches}
-   {$endif MIPS}
-   {$endif MIPS}
-
-   {$ifndef CPUOK}
-   {$fatal One of the switches I386, iA64, Alpha, PowerPC or M68K must be defined}
-   {$endif}
-
-   {$ifdef support_mmx}
-     {$ifndef i386}
-       {$fatal I386 switch must be on for MMX support}
-     {$endif i386}
-   {$endif support_mmx}
-{$endif}
-
 interface
 
 uses
-{$ifdef fpc}
-  {$ifdef GO32V2}
+{$ifdef GO32V2}
+  emu387,
+{$endif GO32V2}
+{$ifdef WATCOM}
     emu387,
-  {$endif GO32V2}
-  {$ifdef WATCOM} // wiktor: pewnie nie potrzeba
-    emu387,
-{    dpmiexcp, }
-  {$endif WATCOM}
-{$endif}
+{$endif WATCOM}
 {$ifdef BrowserLog}
   browlog,
 {$endif BrowserLog}
@@ -310,9 +206,7 @@ end;
 
 function Compile(const cmd:string):longint;
 
-{$ifdef fpc}
 {$maxfpuregisters 0}
-{$endif fpc}
 
   procedure writepathlist(w:longint;l:TSearchPathList);
   var

+ 19 - 20
compiler/fpcdefs.inc

@@ -1,9 +1,8 @@
-{$ifdef FPC}
-  {$mode objfpc}
-  {$asmmode default}
-  {$H-}
-  {$goto on}
-  {$inline on}
+{$mode objfpc}
+{$asmmode default}
+{$H-}
+{$goto on}
+{$inline on}
 
 {$ifdef win32}
   { 256 MB stack }
@@ -20,23 +19,23 @@
   {$endif win64}
 {$endif win32}
 
-  { This reduces the memory requirements a lot }
-  {$PACKENUM 1}
+{ This reduces the memory requirements a lot }
+{$PACKENUM 1}
 
-  { We don't use exceptions, so turn off the implicit
-    exceptions in the constructors }
-  {$IMPLICITEXCEPTIONS OFF}
-  { Inline small functions, but not when EXTDEBUG is used }
-  {$ifndef EXTDEBUG}
-    {$define USEINLINE}
-  {$endif EXTDEBUG}
+{ We don't use exceptions, so turn off the implicit
+  exceptions in the constructors }
+{$IMPLICITEXCEPTIONS OFF}
 
-  {$define USEEXCEPT}
+{ Inline small functions, but not when EXTDEBUG is used }
+{$ifndef EXTDEBUG}
+  {$define USEINLINE}
+{$endif EXTDEBUG}
 
-  {$ifdef cpuarm}
-    {$packrecords c}
-  {$endif cpuarm}
-{$endif}
+{$define USEEXCEPT}
+
+{$ifdef cpuarm}
+  {$packrecords c}
+{$endif cpuarm}
 
 {$ifdef i386}
   {$define x86}

+ 0 - 7
compiler/globals.pas

@@ -581,13 +581,6 @@ implementation
 {$endif unix}
      end;
 
-{$ifndef FPC}
-    Procedure FindClose(var Info : SearchRec);
-      Begin
-      End;
-{$endif not FPC}
-
-
     Function FileExists ( Const F : String) : Boolean;
 {$IFDEF USE_SYSUTILS}
 {$ELSE USE_SYSUTILS}

+ 0 - 4
compiler/globtype.pas

@@ -41,10 +41,6 @@ than 255 characters. That's why using Ansi Strings}
        TCmdStr = String;
 {$ENDIF USE_SYSUTILS}
 
-{$ifndef fpc}
-       qword = int64;
-{$endif fpc}
-
        { Natural integer register type and size for the target machine }
 {$ifdef cpu64bit}
        AWord = qword;

+ 0 - 4
compiler/i386/ag386nsm.pas

@@ -152,11 +152,7 @@ interface
         c  : comp;
         dd : pdouble;
       begin
-{$ifdef FPC}
          c:=comp(d);
-{$else}
-         c:=d;
-{$endif}
          dd:=pdouble(@c); { this makes a bitwise copy of c into a double }
          comp2str:=double2str(dd^);
       end;

+ 2 - 13
compiler/i386/csopt386.pas

@@ -635,29 +635,18 @@ b) tests/webtbs/tw4266.pp
       (HighFound > OrgRegFound))
     then
       begin
-{$ifndef fpc}
-        TmpResult := True;
-{$else fpc}
         CheckSequence := True;
-{$endif fpc}
         prev := highPrev;
         reginfo := HighRegInfo;
         Found := HighFound
       end
     else
       begin
-{$ifndef fpc}
-        TmpResult := OrgRegResult;
-{$else fpc}
         CheckSequence := OrgRegResult;
-{$endif fpc}
         prev := orgPrev;
         Found := OrgRegFound;
         reginfo := OrgRegInfo;
       end;
-{$ifndef fpc}
-  CheckSequence := TmpResult;
-{$endif fpc}
 end; {CheckSequence}
 
 
@@ -970,10 +959,10 @@ begin
 {$endif replaceregdebug}
           exit
         end;
-    
+
       getNextInstruction(p,p);
     end;
-  
+
   tmpState := ptaiprop(p.optinfo)^.Regs[supreg].wState;
   if (newrstate = ptaiprop(p.optinfo)^.Regs[supreg].rState) then
     begin

+ 2 - 2
compiler/i386/daopt386.pas

@@ -1810,10 +1810,10 @@ begin
          (assigned(ref.symbol) and
           (ref.base <> NR_NO)) then
         { local/global variable or parameter which is an array }
-        refsEq := {$ifdef fpc}@{$endif}arrayRefsOverlapping
+        refsEq := @arrayRefsOverlapping
       else
         { local/global variable or parameter which is not an array }
-        refsEq := {$ifdef fpc}@{$endif}refsOverlapping;
+        refsEq := @refsOverlapping;
       invalsmemwrite :=
         assigned(c.memwrite) and
         ((not(cs_opt_size in aktoptimizerswitches) and

+ 0 - 2
compiler/nadd.pas

@@ -101,9 +101,7 @@ implementation
                                 TADDNODE
 *****************************************************************************}
 
-{$ifdef fpc}
 {$maxfpuregisters 0}
-{$endif fpc}
 
     function getbestreal(const t1,t2 : ttype) : ttype;
       const

+ 0 - 2
compiler/ncal.pas

@@ -903,9 +903,7 @@ type
       begin
         inherited ppuload(t,ppufile);
         ppufile.getderef(symtableprocentryderef);
-{$ifdef fpc}
 {$warning FIXME: No withsymtable support}
-{$endif}
         symtableproc:=nil;
         ppufile.getderef(procdefinitionderef);
         ppufile.getsmallset(callnodeflags);

+ 0 - 2
compiler/ncgcnv.pas

@@ -490,9 +490,7 @@ interface
 
     procedure tcgtypeconvnode.second_char_to_char;
       begin
-{$ifdef fpc}
         {$warning todo: add RTL routine for widechar-char conversion }
-{$endif}
         { Quick hack to at least generate 'working' code (PFV) }
         second_int_to_int;
       end;

+ 1 - 1
compiler/ncnv.pas

@@ -2342,7 +2342,7 @@ implementation
          r.obj:=self;
          if not assigned(r.proc) then
            internalerror(200312081);
-         first_call_helper:=tprocedureofobject(r){$ifdef FPC}(){$endif FPC}
+         first_call_helper:=tprocedureofobject(r)()
       end;
 
 

+ 0 - 5
compiler/ninl.pas

@@ -1078,10 +1078,7 @@ implementation
         result := newblock;
       end;
 
-
-{$ifdef fpc}
 {$maxfpuregisters 0}
-{$endif fpc}
 
     function getpi : bestreal;
       begin
@@ -2565,9 +2562,7 @@ implementation
           end;
          dec(parsing_para_level);
        end;
-{$ifdef fpc}
 {$maxfpuregisters default}
-{$endif fpc}
 
     function tinlinenode.docompare(p: tnode): boolean;
       begin

+ 0 - 40
compiler/ogelf.pas

@@ -694,9 +694,6 @@ implementation
     procedure TElfObjectOutput.createrelocsection(s:TElfObjSection);
       var
         i    : longint;
-{$ifdef ver2_0_0}
-        relnative,
-{$endif ver2_0_0}
         rel  : telfreloc;
         objreloc : TObjRelocation;
         relsym,
@@ -779,12 +776,7 @@ implementation
                rel.info:=(relsym shl 8) or reltyp;
 {$endif cpu64bit}
                { write reloc }
-{$ifdef ver2_0_0}
-               relnative:=MaybeSwapElfReloc(rel);
-               relocsect.write(relnative,sizeof(rel));
-{$else}
                relocsect.write(MaybeSwapElfReloc(rel),sizeof(rel));
-{$endif ver2_0_0}
              end;
          end;
       end;
@@ -792,9 +784,6 @@ implementation
 
     procedure TElfObjectOutput.write_internal_symbol(astridx:longint;ainfo:byte;ashndx:word);
       var
-{$ifdef ver2_0_0}
-        elfsymnative,
-{$endif ver2_0_0}
         elfsym : telfsymbol;
       begin
         fillchar(elfsym,sizeof(elfsym),0);
@@ -803,12 +792,7 @@ implementation
         elfsym.st_shndx:=ashndx;
         inc(symidx);
         inc(localsyms);
-{$ifdef ver2_0_0}
-        elfsymnative:=MaybeSwapElfSymbol(elfsym);
-        symtabsect.write(elfsymnative,sizeof(elfsym));
-{$else}
         symtabsect.write(MaybeSwapElfSymbol(elfsym),sizeof(elfsym));
-{$endif ver2_0_0}
       end;
 
 
@@ -823,9 +807,6 @@ implementation
 
         procedure WriteSym(objsym:TObjSymbol);
         var
-{$ifdef ver2_0_0}
-          elfsymnative,
-{$endif}
           elfsym : telfsymbol;
         begin
           with elf32data do
@@ -878,12 +859,7 @@ implementation
                 end;
               objsym.symidx:=symidx;
               inc(symidx);
-{$ifdef ver2_0_0}
-              elfsymnative:=MaybeSwapElfSymbol(elfsym);
-              symtabsect.write(elfsymnative,sizeof(elfsym));
-{$else}
               symtabsect.write(MaybeSwapElfSymbol(elfsym),sizeof(elfsym));
-{$endif ver2_0_0}
             end;
         end;
 
@@ -942,9 +918,6 @@ implementation
 
     procedure TElfObjectOutput.writesectionheader(s:TElfObjSection);
       var
-{$ifdef ver2_0_0}
-        sechdrnative,
-{$endif ver2_0_0}
         sechdr : telfsechdr;
       begin
         fillchar(sechdr,sizeof(sechdr),0);
@@ -957,12 +930,7 @@ implementation
         sechdr.sh_info:=s.shinfo;
         sechdr.sh_addralign:=s.secalign;
         sechdr.sh_entsize:=s.shentsize;
-{$ifdef ver2_0_0}
-        sechdrnative:=MaybeSwapSecHeader(sechdr);
-        writer.write(sechdrnative,sizeof(sechdr));
-{$else}
         writer.write(MaybeSwapSecHeader(sechdr),sizeof(sechdr));
-{$endif ver2_0_0}
       end;
 
 
@@ -1014,9 +982,6 @@ implementation
 
     function TElfObjectOutput.writedata(data:TObjData):boolean;
       var
-{$ifdef ver2_0_0}
-        headernative,
-{$endif ver2_0_0}
         header : telfheader;
         shoffset,
         datapos   : aint;
@@ -1095,12 +1060,7 @@ implementation
            header.e_shnum:=nsections;
            header.e_ehsize:=sizeof(telfheader);
            header.e_shentsize:=sizeof(telfsechdr);
-{$ifdef ver2_0_0}
-           headernative:=MaybeSwapHeader(header);
-           writer.write(headernative,sizeof(header));
-{$else}
            writer.write(MaybeSwapHeader(header),sizeof(header));
-{$endif ver2_0_0}
            writer.writezeros($40-sizeof(header)); { align }
            { Sections }
            ObjSectionList.ForEachCall(@section_write_data,nil);

+ 1 - 1
compiler/parser.pas

@@ -554,7 +554,7 @@ implementation
 {$endif BrowserLog}
                   { Write Browser Collections, also used by the TextMode IDE to
                     retrieve a list of sourcefiles }
-                  do_extractsymbolinfo{$ifdef FPC}(){$endif};
+                  do_extractsymbolinfo();
                 end;
               end;
 

+ 1 - 4
compiler/pexpr.pas

@@ -1259,9 +1259,8 @@ implementation
 {****************************************************************************
                                Factor
 ****************************************************************************}
-{$ifdef fpc}
+
   {$maxfpuregisters 0}
-{$endif fpc}
 
     function factor(getaddr : boolean) : tnode;
 
@@ -2527,9 +2526,7 @@ implementation
           p1.fileinfo:=filepos;
         factor:=p1;
       end;
-{$ifdef fpc}
   {$maxfpuregisters default}
-{$endif fpc}
 
 {****************************************************************************
                              Sub_Expr

+ 89 - 99
compiler/pp.pas

@@ -58,113 +58,103 @@ program pp;
 {$ifdef VER2_0}
   {$if FPC_PATCH<2}
     {$fatal At least FPC 2.0.2 is required to compile the compiler}
-  {$endif}  
+  {$endif}
 {$endif VER2_0}
 
-{$ifdef FPC}
-   { exactly one target CPU must be defined }
-   {$ifdef I386}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif I386}
-   {$ifdef x86_64}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif x86_64}
-   {$ifdef M68K}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif M68K}
-   {$ifdef vis}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif}
-   {$ifdef iA64}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif iA64}
-   {$ifdef POWERPC}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif POWERPC}
-   {$ifdef POWERPC64}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif POWERPC64}
-   {$ifdef ALPHA}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif ALPHA}
-   {$ifdef SPARC}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif SPARC}
-   {$ifdef ARM}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif ARM}
-   {$ifdef MIPS}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif MIPS}
-   {$ifdef AVR}
-     {$ifdef CPUDEFINED}
-        {$fatal ONLY one of the switches for the CPU type must be defined}
-     {$endif CPUDEFINED}
-     {$define CPUDEFINED}
-   {$endif AVR}
-   {$ifndef CPUDEFINED}
-     {$fatal A CPU type switch must be defined}
-   {$endif CPUDEFINED}
-   {$ifdef support_mmx}
-     {$ifndef i386}
-       {$fatal I386 switch must be on for MMX support}
-     {$endif i386}
-   {$endif support_mmx}
+{ exactly one target CPU must be defined }
+{$ifdef I386}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif I386}
+{$ifdef x86_64}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif x86_64}
+{$ifdef M68K}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif M68K}
+{$ifdef vis}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
 {$endif}
+{$ifdef iA64}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif iA64}
+{$ifdef POWERPC}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif POWERPC}
+{$ifdef POWERPC64}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif POWERPC64}
+{$ifdef ALPHA}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif ALPHA}
+{$ifdef SPARC}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif SPARC}
+{$ifdef ARM}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif ARM}
+{$ifdef MIPS}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif MIPS}
+{$ifdef AVR}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif AVR}
+{$ifndef CPUDEFINED}
+  {$fatal A CPU type switch must be defined}
+{$endif CPUDEFINED}
+{$ifdef support_mmx}
+  {$ifndef i386}
+    {$fatal I386 switch must be on for MMX support}
+  {$endif i386}
+{$endif support_mmx}
 
 uses
 {$ifdef cmem}
   cmem,
 {$endif cmem}
-{$ifdef FPC}
-  {$ifdef profile}
-    profile,
-  {$endif profile}
-  {$ifndef NOCATCH}
-    {$ifdef Unix}
-      catch,
-    {$endif}
-    {$ifdef go32v2}
-      catch,
-    {$endif}
-    {$ifdef WATCOM}
-      catch,
-    {$endif}
-  {$endif NOCATCH}
-{$endif FPC}
+{$ifdef profile}
+  profile,
+{$endif profile}
+{$ifndef NOCATCH}
+  {$if defined(Unix) or defined(Go32v2) or defined(Watcom)}
+    catch,
+  {$endif}
+{$endif NOCATCH}
   globals,compiler;
 
 var

+ 4 - 6
compiler/ptconst.pas

@@ -49,9 +49,8 @@ implementation
        cpuinfo,cgbase,dbgbase
        ;
 
-{$ifdef fpc}
-  {$maxfpuregisters 0}
-{$endif fpc}
+{$maxfpuregisters 0}
+
     { this procedure reads typed constants }
     procedure readtypedconst(list:tasmlist;const t:ttype;sym : ttypedconstsym;writable : boolean);
       label
@@ -1069,8 +1068,7 @@ implementation
            list.concatlist(datalist);
          datalist.free;
       end;
-{$ifdef fpc}
-  {$maxfpuregisters default}
-{$endif fpc}
+
+{$maxfpuregisters default}
 
 end.

+ 0 - 23
compiler/utils/fixnasm.pp

@@ -14,29 +14,6 @@
  **********************************************************************}
 program fixnasm;
 
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
 const
   spaces='                                                       ';
 var

+ 0 - 6
compiler/utils/fpimpdef.pp

@@ -1,15 +1,9 @@
 {$APPTYPE CONSOLE}
 program FPimpdef;
 {$DEFINE STANDALONE}
-{$IFNDEF FPC}
-uses
- dmisc,
- ImpDef;
-{$ELSE}
 uses
  DOS,
  ImpDef;
-{$ENDIF}
 var
 binname:string;
 function Ofound(const short,full:string):longint;

+ 0 - 23
compiler/utils/mk68kreg.pp

@@ -32,29 +32,6 @@ var s : string;
     regnumber_index,
     std_regname_index,gas_regname_index : array[0..max_regcount-1] of byte;
 
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
 function tostr(l : longint) : string;
 
 begin

+ 0 - 23
compiler/utils/mkarmins.pp

@@ -22,29 +22,6 @@ var
    i : longint;
    x86_64 : boolean;
 
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
     function lower(const s : string) : string;
     {
       return lowercased string of s

+ 0 - 23
compiler/utils/mkarmreg.pp

@@ -31,29 +31,6 @@ var s : string;
     regnumber_index,
     std_regname_index : array[0..max_regcount-1] of byte;
 
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
 function tostr(l : longint) : string;
 
 begin

+ 0 - 23
compiler/utils/mkmpsreg.pp

@@ -35,29 +35,6 @@ var s : string;
     gas_regname_index,
     mot_regname_index : array[0..max_regcount-1] of byte;
 
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
 function tostr(l : longint) : string;
 
 begin

+ 0 - 23
compiler/utils/mkppcreg.pp

@@ -37,29 +37,6 @@ var s : string;
     gas_regname_index,
     mot_regname_index : array[0..max_regcount-1] of byte;
 
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
 function tostr(l : longint) : string;
 
 begin

+ 0 - 23
compiler/utils/mkspreg.pp

@@ -33,29 +33,6 @@ var s : string;
     regnumber_index,
     std_regname_index : array[0..max_regcount-1] of byte;
 
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
 function tostr(l : longint) : string;
 
 begin

+ 0 - 23
compiler/utils/mkx86reg.pp

@@ -31,29 +31,6 @@ var s : string;
     x86_64 : boolean;
     fileprefix : string;
 
-{$ifndef FPC}
-  procedure readln(var t:text;var s:string);
-  var
-    c : char;
-    i : longint;
-  begin
-    c:=#0;
-    i:=0;
-    while (not eof(t)) and (c<>#10) do
-     begin
-       read(t,c);
-       if c<>#10 then
-        begin
-          inc(i);
-          s[i]:=c;
-        end;
-     end;
-    if (i>0) and (s[i]=#13) then
-     dec(i);
-    s[0]:=chr(i);
-  end;
-{$endif}
-
 function tostr(l : longint) : string;
 
 begin

+ 0 - 6
compiler/utils/ppufiles.pp

@@ -56,11 +56,7 @@ Procedure Error(const s:string;stop:boolean);
   Write an error message to stderr
 }
 begin
-{$ifdef FPC}
   writeln(stderr,s);
-{$else}
-  writeln(s);
-{$endif}
   if stop then
    halt(1);
 end;
@@ -235,9 +231,7 @@ begin
         DoPPU(SplitPath(InFile)+Dir.Name);
         FindNext(Dir);
       end;
-{$ifdef fpc}
      FindClose(Dir);
-{$endif}
    end;
 { Display the files }
   while assigned(outfiles) do

+ 0 - 4
compiler/utils/ppumove.pp

@@ -101,11 +101,7 @@ Procedure Error(const s:string;stop:boolean);
   Write an error message to stderr
 }
 begin
-{$ifdef FPC}
   writeln(stderr,s);
-{$else}
-  writeln(s);
-{$endif}
   if stop then
    halt(1);
 end;

+ 1 - 1
compiler/widestr.pas

@@ -166,7 +166,7 @@ unit widestr;
     function unicode2asciichar(c : tcompilerwidechar) : char;
 
       begin
-        {$ifdef fpc}{$warning todo}{$endif}
+{$warning TODO unicode2asciichar}
         unicode2asciichar:=#0;
       end;
 

+ 0 - 4
compiler/x86/agx86int.pas

@@ -134,11 +134,7 @@ implementation
         c  : comp;
         dd : pdouble;
       begin
-{$ifdef FPC}
          c:=comp(d);
-{$else}
-         c:=d;
-{$endif}
          dd:=pdouble(@c); { this makes a bitwise copy of c into a double }
          comp2str:=double2str(dd^);
       end;