瀏覽代碼

* Removed/ifdefed lots of unused variables.

git-svn-id: trunk@48384 -
yury 4 年之前
父節點
當前提交
64c586b86d

+ 0 - 1
compiler/aarch64/agcpugas.pas

@@ -265,7 +265,6 @@ unit agcpugas;
         sehlist,
         tmplist : TAsmList;
         xdatasym : tasmsymbol;
-        unwindread,
         unwindrec : longword;
       begin
         if not assigned(list) then

+ 0 - 4
compiler/aarch64/aoptcpu.pas

@@ -754,8 +754,6 @@ Implementation
 
 
   function TCpuAsmOptimizer.PeepHoleOptPass1Cpu(var p: tai): boolean;
-    var
-      hp1: tai;
     begin
       result := false;
       if p.typ=ait_instruction then
@@ -817,8 +815,6 @@ Implementation
 
 
   function TCpuAsmOptimizer.PeepHoleOptPass2Cpu(var p: tai): boolean;
-    var
-      hp1: tai;
     begin
       result := false;
       if p.typ=ait_instruction then

+ 0 - 1
compiler/aggas.pas

@@ -497,7 +497,6 @@ implementation
     procedure TGNUAssembler.WriteSection(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder;secalign:longint;secflags:TSectionFlags=[];secprogbits:TSectionProgbits=SPB_None);
       var
         s : string;
-        secflag: TSectionFlag;
         usesectionprogbits,
         usesectionflags: boolean;
       begin

+ 2 - 3
compiler/arm/aoptcpu.pas

@@ -540,7 +540,6 @@ Implementation
   function TCpuAsmOptimizer.OptPass1ADDSUB(var p: tai): Boolean;
     var
       hp1,hp2: tai;
-      oldreg: tregister;
     begin
       Result := OptPass1DataCheckMov(p);
 
@@ -621,7 +620,7 @@ Implementation
 
   function TCpuAsmOptimizer.OptPass1MUL(var p: tai): Boolean;
     var
-      hp1,hp2: tai;
+      hp1: tai;
       oldreg: tregister;
     begin
       Result := OptPass1DataCheckMov(p);
@@ -1099,7 +1098,7 @@ Implementation
 
   function TCpuAsmOptimizer.OptPass1MOV(var p: tai): Boolean;
     var
-      hp1, hpfar1, hp2, hp3: tai;
+      hp1, hpfar1, hp2: tai;
       i, i2: longint;
       tempop: tasmop;
       dealloc: tai_regalloc;

+ 0 - 2
compiler/avr/agavrgas.pas

@@ -154,8 +154,6 @@ unit agavrgas;
       function getopstr(const o:toper) : string;
         var
           hs : string;
-          first : boolean;
-          r : tsuperregister;
         begin
           case o.typ of
             top_reg:

+ 0 - 1
compiler/avr/aoptcpu.pas

@@ -258,7 +258,6 @@ Implementation
 
     var
       hp1, hp2, hp3: tai;
-      s: string;
     begin
       result:=false;
 

+ 5 - 11
compiler/avr/cgcpu.pas

@@ -264,7 +264,6 @@ unit cgcpu;
       var
         i,j : longint;
         hp : PCGParaLocation;
-        ref: treference;
         tmpreg: TRegister;
       begin
         if not(tcgsize2size[paraloc.Size] in [1..4]) then
@@ -417,7 +416,7 @@ unit cgcpu;
 
      procedure tcgavr.a_op_const_reg_reg_internal(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src,srchi,dst,dsthi: tregister);
        var
-         tmpSrc, tmpDst, countreg: TRegister;
+         countreg: TRegister;
          b, b2, i, j: byte;
          s1, s2, t1: integer;
          l1: TAsmLabel;
@@ -574,10 +573,7 @@ unit cgcpu;
          countreg,
          tmpreg: tregister;
          i : integer;
-         instr : taicpu;
-         paraloc1,paraloc2 : TCGPara;
          l1,l2 : tasmlabel;
-         pd : tprocdef;
          hovloc: tlocation;
 
       { NextRegDst* is sometimes called before the register usage and sometimes afterwards }
@@ -1093,7 +1089,6 @@ unit cgcpu;
     function tcgavr.normalize_ref(list:TAsmList;ref: treference;tmpreg : tregister) : treference;
       var
         tmpref : treference;
-        l : tasmlabel;
       begin
         Result:=ref;
 
@@ -1702,8 +1697,7 @@ unit cgcpu;
     procedure tcgavr.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;
       cmp_op : topcmp;a : tcgint;reg : tregister;l : tasmlabel);
       var
-        swapped , test_msb: boolean;
-        tmpreg : tregister;
+        swapped : boolean;
         i : byte;
       begin
         if a=0 then
@@ -1856,7 +1850,7 @@ unit cgcpu;
     procedure tcgavr.g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister);
       var
         l : TAsmLabel;
-        tmpflags : TResFlags;
+        //tmpflags : TResFlags;
         i: Integer;
         hreg: TRegister;
       begin
@@ -1889,8 +1883,8 @@ unit cgcpu;
 
 
     procedure tcgavr.a_adjust_sp(list : TAsmList; value : longint);
-      var
-        i : integer;
+      {var
+        i : integer; }
       begin
         case value of
           0:

+ 0 - 1
compiler/avr/cpupara.pas

@@ -400,7 +400,6 @@ unit cpupara;
       var
         cur_stack_offset: aword;
         curintreg, curfloatreg, curmmreg: tsuperregister;
-        retcgsize  : tcgsize;
       begin
         init_values(curintreg,curfloatreg,curmmreg,cur_stack_offset);
 

+ 1 - 1
compiler/avr/navrmat.pas

@@ -59,7 +59,7 @@ implementation
 
     procedure tavrnotnode.second_boolean;
       var
-        tmpreg,lreg : tregister;
+        tmpreg : tregister;
         i : longint;
         falselabel,truelabel,skiplabel: TAsmLabel;
       begin

+ 3 - 7
compiler/avr/raavrgas.pas

@@ -326,10 +326,8 @@ Unit raavrgas;
 
       var
         tempreg : tregister;
-        ireg : tsuperregister;
         hl : tasmlabel;
         ofs : longint;
-        registerset : tcpuregisterset;
         tempstr : string;
         tempsymtyp : tasmsymtype;
       Begin
@@ -612,18 +610,16 @@ Unit raavrgas;
 
 
     function tavrattreader.is_asmopcode(const s: string):boolean;
-
+(*
       const
         { sorted by length so longer postfixes will match first }
         postfix2strsorted : array[1..19] of string[2] = (
           'EP','SB','BT','SH',
           'IA','IB','DA','DB','FD','FA','ED','EA',
           'B','D','E','P','T','H','S');
-
+*)
       var
-        len,
-        j,
-        sufidx : longint;
+        j : longint;
         hs : string;
         maxlen : longint;
         icond : tasmcond;

+ 3 - 7
compiler/avr/rgcpu.pas

@@ -56,8 +56,8 @@ unit rgcpu;
 
 
     procedure trgcpu.add_constraints(reg:tregister);
-      var
-        supreg,i : Tsuperregister;
+      {var
+        supreg,i : Tsuperregister;}
       begin
         case getsubreg(reg) of
           { Let 64bit floats conflict with all odd float regs }
@@ -76,8 +76,8 @@ unit rgcpu;
           { Let 64bit ints conflict with all odd int regs }
           R_SUBQ:
             begin
-              supreg:=getsupreg(reg);
               {
+              supreg:=getsupreg(reg);
               i:=RS_G1;
               while (i<=RS_I7) do
                 begin
@@ -95,7 +95,6 @@ unit rgcpu;
         helpins  : tai;
         tmpref   : treference;
         helplist : TAsmList;
-        hreg     : tregister;
       begin
         if (abs(spilltemp.offset)>63) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then
           begin
@@ -121,7 +120,6 @@ unit rgcpu;
       var
         tmpref   : treference;
         helplist : TAsmList;
-        hreg     : tregister;
       begin
         if (abs(spilltemp.offset)>63) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then
           begin
@@ -185,8 +183,6 @@ unit rgcpu;
 
 
     function trgcpu.do_spill_replace(list:TAsmList;instr:tai_cpu_abstract_sym;orgreg:tsuperregister;const spilltemp:treference):boolean;
-      var
-        b : byte;
       begin
         result:=false;
         if not(spilltemp.offset in [0..63]) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then

+ 0 - 3
compiler/i8086/cpupara.pas

@@ -101,8 +101,6 @@ unit cpupara;
 
 
     function tcpuparamanager.ret_in_param(def:tdef;pd:tabstractprocdef):boolean;
-      var
-        size: longint;
       begin
         if handle_common_ret_in_param(def,pd,result) then
           exit;
@@ -307,7 +305,6 @@ unit cpupara;
       var
         retcgsize  : tcgsize;
         paraloc : pcgparalocation;
-        sym: tfieldvarsym;
         usedef: tdef;
         handled: boolean;
       begin

+ 0 - 1
compiler/i8086/n8086tcon.pas

@@ -57,7 +57,6 @@ uses
         hp: tnode;
         srsym: tsym;
         pd: tprocdef;
-        resourcestrrec: trecorddef;
       begin
         { support word/smallint constants, initialized with Seg() }
         if (def.ordtype in [u16bit,s16bit]) and (node.nodetype=inlinen) and

+ 0 - 3
compiler/jvm/agjasmin.pas

@@ -1126,9 +1126,6 @@ implementation
 
 
     function getopstr(const o:toper) : ansistring;
-      var
-        d: double;
-        s: single;
       begin
         case o.typ of
           top_reg:

+ 2 - 2
compiler/jvm/cpubase.pas

@@ -302,11 +302,11 @@ uses
       regnumber_index : array[tregisterindex] of tregisterindex = (
         {$i rjvmrni.inc}
       );
-
+(*
       std_regname_index : array[tregisterindex] of tregisterindex = (
         {$i rjvmsri.inc}
       );
-
+*)
     function reg_cgsize(const reg: tregister): tcgsize;
       begin
         result:=OS_NO;

+ 1 - 2
compiler/jvm/njvminl.pas

@@ -161,7 +161,7 @@ implementation
     function tjvminlinenode.first_copy: tnode;
       var
         ppn: tcallparanode;
-        arr, len, start, kind: tnode;
+        arr, len, start: tnode;
         eledef: tdef;
         counter, ndims: longint;
         finaltype: char;
@@ -401,7 +401,6 @@ implementation
         lefttemp: ttempcreatenode;
         newblock: tblocknode;
         newstatement: tstatementnode;
-        primitive: boolean;
       begin
         { first parameter is the array, the rest are the dimensions }
         newparas:=tcallparanode(left).right;

+ 0 - 1
compiler/jvm/njvmmat.pas

@@ -78,7 +78,6 @@ implementation
       var
         tmpreg: tregister;
         lab: tasmlabel;
-        ovloc: tlocation;
         op: topcg;
         isu32int: boolean;
       begin

+ 1 - 2
compiler/nadd.pas

@@ -575,7 +575,7 @@ implementation
 
 
       var
-        t,vl,hp,lefttarget,righttarget, hp2: tnode;
+        t,vl,lefttarget,righttarget: tnode;
         lt,rt   : tnodetype;
         hdef,
         rd,ld   , inttype: tdef;
@@ -3823,7 +3823,6 @@ implementation
     function taddnode.first_add64bitint: tnode;
       var
         procname: string[31];
-        temp: tnode;
         power: longint;
       begin
         result := nil;

+ 2 - 0
compiler/nbas.pas

@@ -706,8 +706,10 @@ implementation
 
 
     function tblocknode.simplify(forinline : boolean): tnode;
+{$ifdef break_inlining}
       var
         a : array[0..3] of tstatementnode;
+{$endif break_inlining}
       begin
         result := nil;
         { Warning: never replace a blocknode with another node type,

+ 0 - 1
compiler/ncginl.pas

@@ -406,7 +406,6 @@ implementation
          hregisterhi,
 {$endif not cpu64bitalu and not cpuhighleveltarget}
          hregister : tregister;
-         hloc: tlocation;
         begin
           { set defaults }
           addconstant:=true;

+ 1 - 7
compiler/ogomf.pas

@@ -1567,7 +1567,6 @@ implementation
         SegDef: TOmfRecord_SEGDEF;
         GrpDef: TOmfRecord_GRPDEF;
         nsections,ngroups: Integer;
-        objsym: TObjSymbol;
       begin
         { calc amount of sections we have and set their index, starting with 1 }
         nsections:=1;
@@ -3157,9 +3156,6 @@ implementation
         i: Integer;
         ExeSec: TMZExeSection;
         ObjSec: TOmfObjSection;
-        StartDataPos: LongWord;
-        buf: array [0..1023] of byte;
-        bytesread: LongWord;
       begin
         Header.LoadableImageSize:=0;
         ExeSec:=MZFlatContentSection;
@@ -3271,7 +3267,6 @@ implementation
         i: Integer;
         ExeSec: TMZExeSection;
         ObjSec: TOmfObjSection;
-        StartDataPos: LongWord;
         buf: array [0..1023] of byte;
         bytesread: LongWord;
       begin
@@ -4102,9 +4097,8 @@ cleanup:
 
     function TNewExeEntryTable.GetSize: QWord;
       var
-        CurBundleStart, i: Integer;
+        CurBundleStart: Integer;
         CurBundleSize: Byte;
-        cp: TNewExeEntryPoint;
       begin
         Result:=0;
         CurBundleStart:=1;

+ 0 - 2
compiler/optloop.pas

@@ -563,8 +563,6 @@ unit optloop;
 
 
     function OptimizeForLoop_iterforloops(var n: tnode; arg: pointer): foreachnoderesult;
-      var
-        hp : tnode;
       begin
         Result:=fen_false;
         if (n.nodetype=forn) and

+ 1 - 1
compiler/psub.pas

@@ -1312,7 +1312,7 @@ implementation
         nodeset : THashSet absolute arg;
         entry : ptempinfo_flags_entry;
         i : longint;
-        hashsetitem: PHashSetItem;
+        {hashsetitem: PHashSetItem;}
       begin
         result:=fen_true;
         case n.nodetype of

+ 0 - 2
compiler/scandir.pas

@@ -1362,7 +1362,6 @@ unit scandir;
 
     procedure dir_setpeflags;
       var
-        ident : string;
         flags : int64;
       begin
         if not (target_info.system in (systems_all_windows)) then
@@ -1378,7 +1377,6 @@ unit scandir;
 
     procedure dir_setpeoptflags;
       var
-        ident : string;
         flags : int64;
       begin
         if not (target_info.system in (systems_all_windows)) then

+ 2 - 0
compiler/symdef.pas

@@ -2343,8 +2343,10 @@ implementation
 
 
    function tstoreddef.is_intregable : boolean;
+{$ifndef cpuhighleveltarget}
      var
        recsize,temp: longint;
+{$endif cpuhighleveltarget}
      begin
         case typ of
           orddef,

+ 0 - 2
compiler/systems/t_bsd.pas

@@ -231,7 +231,6 @@ end;
 Function TLinkerBSD.WriteResponseFile(isdll:boolean) : Boolean;
 Var
   linkres      : TLinkRes;
-  FilesList    : TLinkRes;
   i            : longint;
   HPath        : TCmdStrListItem;
   s,s1,s2      : TCmdStr;
@@ -581,7 +580,6 @@ var
   targetstr,
   emulstr       : TCmdStr;
   GCSectionsStr : string[63];
-  exportedsyms: text;
   success : boolean;
 begin
   MakeSharedLibrary:=false;

+ 1 - 2
compiler/systems/t_darwin.pas

@@ -320,8 +320,7 @@ implementation
       FilesList    : TLinkRes;
       i            : longint;
       HPath        : TCmdStrListItem;
-      s,s1,s2      : TCmdStr;
-      Fl1,Fl2      : Boolean;
+      s            : TCmdStr;
     begin
       WriteResponseFile:=False;
       if ReOrderEntries Then

+ 5 - 8
compiler/systems/t_embed.pas

@@ -1676,17 +1676,14 @@ function TLinkerEmbedded.postprocessexecutable(const fn : string;isdll:boolean):
 function TlinkerEmbedded_SdccSdld.WriteResponseFile: Boolean;
   Var
     linkres  : TLinkRes;
-    i        : longint;
-    HPath    : TCmdStrListItem;
-    s,s1,s2  : TCmdStr;
+    //i        : longint;
+    //HPath    : TCmdStrListItem;
+    s{,s1,s2}  : TCmdStr;
     prtobj,
     cprtobj  : string[80];
     linklibc : boolean;
-    found1,
-    found2   : boolean;
-  {$if defined(ARM)}
-    LinkStr  : string;
-  {$endif}
+    //found1,
+    //found2   : boolean;
   begin
     WriteResponseFile:=False;
     linklibc:=(SharedLibFiles.Find('c')<>nil);

+ 3 - 1
compiler/systems/t_freertos.pas

@@ -944,7 +944,6 @@ end;
 function TlinkerFreeRTOS.MakeExecutable:boolean;
 var
   StaticStr,
-  S,
   binstr,
   cmdstr,
   mapstr: Ansistring;
@@ -953,9 +952,12 @@ var
   DynLinkStr,
   StripStr,
   FixedExeFileName: string;
+{$ifdef XTENSA}
+  S: Ansistring;
   t: Text;
   hp: TCmdStrListItem;
   filepath: TCmdStr;
+{$endif XTENSA}
 begin
 {$ifdef XTENSA}
   { idfpath can be set by -Ff, else default to environment value of IDF_PATH }

+ 2 - 0
compiler/systems/t_win.pas

@@ -430,7 +430,9 @@ implementation
          l1,l2,l3,l4 {$ifdef ARM} ,l5 {$endif ARM} : tasmlabel;
          importname : string;
          suffix : integer;
+{$ifndef AARCH64}
          href : treference;
+{$endif AARCH64}
          i,j  : longint;
          ImportLibrary : TImportLibrary;
          ImportSymbol  : TImportSymbol;

+ 0 - 1
compiler/systems/t_win16.pas

@@ -238,7 +238,6 @@ function TExternalLinkerWin16WLink.WriteResponseFile(isdll: boolean): Boolean;
 Var
   linkres  : TLinkRes;
   s        : string;
-  i: Integer;
 begin
   WriteResponseFile:=False;
 

+ 2 - 0
compiler/x86/aasmcpu.pas

@@ -921,6 +921,7 @@ implementation
           Intel 64 and IA-32 Architectures Software Developer’s Manual
             Volume 2B: Instruction Set Reference, N-Z, January 2015
         }
+{$ifndef i8086}
         alignarray_cmovcpus:array[0..10] of string[11]=(
           #$66#$66#$66#$0F#$1F#$84#$00#$00#$00#$00#$00,
           #$66#$66#$0F#$1F#$84#$00#$00#$00#$00#$00,
@@ -933,6 +934,7 @@ implementation
           #$0F#$1F#$00,
           #$66#$90,
           #$90);
+{$endif i8086}
 {$ifdef i8086}
         alignarray:array[0..5] of string[8]=(
           #$90#$90#$90#$90#$90#$90#$90,

+ 2 - 4
compiler/x86/agx86nsm.pas

@@ -53,7 +53,9 @@ interface
       private
         FSections: TFPHashObjectList;
         FGroups: TFPHashObjectList;
+{$ifndef i8086}
         using_relative : boolean;
+{$endif i8086}
         function CodeSectionName(const aname:string): string;
         procedure WriteReference(var ref : treference);
         procedure WriteOper(const o:toper;s : topsize; opcode: tasmop;ops:longint;dest : boolean);
@@ -681,10 +683,6 @@ interface
       end;
 
     procedure TX86NasmAssembler.WriteGroups;
-      {$ifdef i8086}
-      var
-        i: Integer;
-      {$endif i8086}
       begin
 {$ifdef i8086}
         if target_info.system in [system_i8086_msdos,system_i8086_win16,system_i8086_embedded] then

+ 10 - 11
compiler/x86/aoptx86.pas

@@ -1654,9 +1654,6 @@ unit aoptx86;
 
     { Replaces all references to AOldReg in a memory reference to ANewReg }
     class function TX86AsmOptimizer.ReplaceRegisterInRef(var ref: TReference; const AOldReg, ANewReg: TRegister): Boolean;
-      var
-        OldSupReg: TSuperRegister;
-        OldSubReg, MemSubReg: TSubRegister;
       begin
         Result := False;
         { For safety reasons, only check for exact register matches }
@@ -1681,7 +1678,7 @@ unit aoptx86;
     class function TX86AsmOptimizer.ReplaceRegisterInOper(const p: taicpu; const OperIdx: Integer; const AOldReg, ANewReg: TRegister): Boolean;
       var
         OldSupReg, NewSupReg: TSuperRegister;
-        OldSubReg, NewSubReg, MemSubReg: TSubRegister;
+        OldSubReg, NewSubReg: TSubRegister;
         OldRegType: TRegisterType;
         ThisOper: POper;
       begin
@@ -1839,7 +1836,6 @@ unit aoptx86;
     function TX86AsmOptimizer.DeepMOVOpt(const p_mov: taicpu; const hp: taicpu): Boolean;
       var
         CurrentReg, ReplaceReg: TRegister;
-        SubReg: TSubRegister;
       begin
         Result := False;
 
@@ -3210,8 +3206,7 @@ unit aoptx86;
 
     function TX86AsmOptimizer.OptPass1LEA(var p : tai) : boolean;
       var
-        hp1, hp2, hp3: tai;
-        l : ASizeInt;
+        hp1: tai;
         ref: Integer;
         saveref: treference;
         TempReg: TRegister;
@@ -5686,13 +5681,15 @@ unit aoptx86;
 
     function TX86AsmOptimizer.OptPass2Jcc(var p : tai) : boolean;
       var
-        hp1,hp2,hp3,hp4,hpmov2: tai;
-        carryadd_opcode : TAsmOp;
+        hp1,hp2: tai;
+{$ifndef i8086}
+        hp3,hp4,hpmov2: tai;
         l : Longint;
         condition : TAsmCond;
+{$endif i8086}
+        carryadd_opcode : TAsmOp;
         symbol: TAsmSymbol;
         reg: tsuperregister;
-        regavailable: Boolean;
         increg, tmpreg: TRegister;
       begin
         result:=false;
@@ -7072,12 +7069,14 @@ unit aoptx86;
 
 
     function TX86AsmOptimizer.PostPeepholeOptPush(var p : tai) : Boolean;
+{$ifdef x86_64}
       var
         hp1, hp2, hp3, hp4, hp5: tai;
+{$endif x86_64}
       begin
         Result:=false;
-        hp5:=nil;
 {$ifdef x86_64}
+        hp5:=nil;
         { replace
             push %rax
             call   procname

+ 6 - 2
compiler/x86/cgx86.pas

@@ -447,9 +447,9 @@ unit cgx86;
       var
         hreg : tregister;
         href : treference;
-{$ifndef x86_64}
+{$ifdef i386}
         add_hreg: boolean;
-{$endif not  x86_64}
+{$endif i386}
       begin
         hreg:=NR_NO;
         { make_simple_ref() may have already been called earlier, and in that
@@ -1083,7 +1083,9 @@ unit cgx86;
     procedure tcgx86.a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);
       var
         dirref,tmpref : treference;
+{$ifndef i8086}
         tmpreg : TRegister;
+{$endif i8086}
       begin
         dirref:=ref;
 
@@ -3231,10 +3233,12 @@ unit cgx86;
 
 {$ifdef x86}
 {$ifndef NOTARGETWIN}
+{$ifndef i8086}
       var
         href : treference;
         i : integer;
         again : tasmlabel;
+{$endif i8086}
 {$endif NOTARGETWIN}
 {$endif x86}
       begin

+ 4 - 0
compiler/x86/nx86inl.pas

@@ -1144,6 +1144,7 @@ implementation
 
 
     procedure tx86inlinenode.second_fma;
+{$ifndef i8086}
       const
         op : array[false..true,false..true,s32real..s64real,0..3] of TAsmOp =
           (
@@ -1178,6 +1179,7 @@ implementation
         negop3,
         negproduct,
         gotmem : boolean;
+{$endif i8086}
       begin
 {$ifndef i8086}
          if (cpu_capabilities[current_settings.cputype]*[CPUX86_HAS_FMA,CPUX86_HAS_FMA4])<>[] then
@@ -1444,6 +1446,7 @@ implementation
 
 
     procedure tx86inlinenode.second_minmax;
+{$ifndef i8086}
       const
         oparray : array[false..true,false..true,s32real..s64real] of TAsmOp =
           (
@@ -1463,6 +1466,7 @@ implementation
         i : integer;
         gotmem : boolean;
         op: TAsmOp;
+{$endif i8086}
       begin
 {$ifndef i8086}
          if

+ 0 - 4
compiler/x86/nx86mat.pas

@@ -164,10 +164,6 @@ interface
 
 
     procedure tx86unaryminusnode.second_float;
-      var
-        reg : tregister;
-        href : treference;
-        l1 : tasmlabel;
       begin
         secondpass(left);
 

+ 1 - 1
compiler/x86/nx86set.pas

@@ -420,7 +420,7 @@ implementation
            start,stop : byte;    {Start/stop when range; Stop=element when an element.}
          end;
        var
-         hreg,hreg2,
+         hreg,{$ifndef i8086} hreg2, {$endif}
          pleftreg   : tregister;
          opsize     : tcgsize;
          opdef      : torddef;

+ 0 - 2
compiler/x86/rax86.pas

@@ -1475,8 +1475,6 @@ procedure Tx86Instruction.SetInstructionOpsize;
     end;
   end;
 
-var
-  isBCastMemRef: boolean;
 begin
   if opsize<>S_NO then
    exit;