浏览代码

* Removed unused vars for mipsel compiler.

git-svn-id: trunk@31745 -
yury 10 年之前
父节点
当前提交
11a9ff4a43

+ 4 - 1
compiler/aoptobj.pas

@@ -1221,8 +1221,11 @@ Unit AoptObj;
        the level parameter denotes how deeep we have already followed the jump,
        the level parameter denotes how deeep we have already followed the jump,
        to avoid endless loops with constructs such as "l5: ; jmp l5"           }
        to avoid endless loops with constructs such as "l5: ; jmp l5"           }
 
 
-      var p1, p2: tai;
+      var p1: tai;
+          {$if not defined(MIPS) and not defined(JVM)}
+          p2: tai;
           l: tasmlabel;
           l: tasmlabel;
+          {$endif}
 
 
       begin
       begin
         GetfinalDestination := false;
         GetfinalDestination := false;

+ 5 - 2
compiler/mips/cpugas.pas

@@ -235,10 +235,10 @@ unit cpugas;
     procedure TMIPSInstrWriter.WriteInstruction(hp: Tai);
     procedure TMIPSInstrWriter.WriteInstruction(hp: Tai);
       var
       var
         Op: TAsmOp;
         Op: TAsmOp;
-        s,s1:  string;
+        s:  string;
         i:  integer;
         i:  integer;
         tmpfpu: string;
         tmpfpu: string;
-        tmpfpu_len: longint;
+        //tmpfpu_len: longint;
         r: TRegister;
         r: TRegister;
       begin
       begin
         if hp.typ <> ait_instruction then
         if hp.typ <> ait_instruction then
@@ -357,6 +357,7 @@ unit cpugas;
 
 
 
 
     const
     const
+{$ifdef MIPSEL}
       as_MIPSEL_as_info: tasminfo =
       as_MIPSEL_as_info: tasminfo =
         (
         (
         id: as_gas;
         id: as_gas;
@@ -369,6 +370,7 @@ unit cpugas;
         comment: '# ';
         comment: '# ';
         dollarsign: '$';
         dollarsign: '$';
         );
         );
+{$else MIPSEL}
       as_MIPSEB_as_info: tasminfo =
       as_MIPSEB_as_info: tasminfo =
         (
         (
         id: as_gas;
         id: as_gas;
@@ -381,6 +383,7 @@ unit cpugas;
         comment: '# ';
         comment: '# ';
         dollarsign: '$';
         dollarsign: '$';
         );
         );
+{$endif MIPSEL}
 
 
 begin
 begin
 {$ifdef MIPSEL}
 {$ifdef MIPSEL}

+ 1 - 1
compiler/mips/itcpugas.pas

@@ -52,7 +52,7 @@ const
 
 
 function findreg_by_gasname(const s: string): tregisterindex;
 function findreg_by_gasname(const s: string): tregisterindex;
 var
 var
-  i, p: tregisterindex;
+  p: tregisterindex;
 begin
 begin
   for p := low(tregisterindex) to high(tregisterindex) do
   for p := low(tregisterindex) to high(tregisterindex) do
   begin
   begin

+ 0 - 1
compiler/mips/ncpuadd.pas

@@ -267,7 +267,6 @@ procedure tmipsaddnode.second_cmpfloat;
 var
 var
   op: tasmop;
   op: tasmop;
   lreg,rreg: tregister;
   lreg,rreg: tregister;
-  ai: Taicpu;
 begin
 begin
   pass_left_right;
   pass_left_right;
   if nf_swapped in flags then
   if nf_swapped in flags then

+ 1 - 1
compiler/mips/ncpuset.pas

@@ -67,7 +67,7 @@ procedure tcpucasenode.genjumptable(hp: pcaselabel; min_, max_: aint);
 var
 var
   table: tasmlabel;
   table: tasmlabel;
   last:  TConstExprInt;
   last:  TConstExprInt;
-  indexreg, jmpreg, basereg: tregister;
+  indexreg, jmpreg: tregister;
   href:  treference;
   href:  treference;
   jumpsegment: TAsmlist;
   jumpsegment: TAsmlist;
   opcgsize: tcgsize;
   opcgsize: tcgsize;

+ 1 - 1
compiler/ncgutil.pas

@@ -785,7 +785,7 @@ implementation
         sizeleft  : aint;
         sizeleft  : aint;
         tempref   : treference;
         tempref   : treference;
 {$ifdef mips}
 {$ifdef mips}
-        tmpreg   : tregister;
+        //tmpreg   : tregister;
 {$endif mips}
 {$endif mips}
 {$ifndef cpu64bitalu}
 {$ifndef cpu64bitalu}
         tempreg  : tregister;
         tempreg  : tregister;

+ 2 - 0
compiler/ogelf.pas

@@ -3275,7 +3275,9 @@ implementation
       pltreltags: array[boolean] of longword=(DT_REL,DT_RELA);
       pltreltags: array[boolean] of longword=(DT_REL,DT_RELA);
       relsztags:  array[boolean] of longword=(DT_RELSZ,DT_RELASZ);
       relsztags:  array[boolean] of longword=(DT_RELSZ,DT_RELASZ);
       relenttags: array[boolean] of longword=(DT_RELENT,DT_RELAENT);
       relenttags: array[boolean] of longword=(DT_RELENT,DT_RELAENT);
+      {$ifndef MIPS}
       relcnttags: array[boolean] of longword=(DT_RELCOUNT,DT_RELACOUNT);
       relcnttags: array[boolean] of longword=(DT_RELCOUNT,DT_RELACOUNT);
+      {$endif MIPS}
 
 
     procedure TElfExeOutput.FinishDynamicTags;
     procedure TElfExeOutput.FinishDynamicTags;
       var
       var

+ 2 - 2
compiler/pstatmnt.pas

@@ -1398,9 +1398,9 @@ implementation
     function assembler_block : tnode;
     function assembler_block : tnode;
       var
       var
         p : tnode;
         p : tnode;
-{$ifndef arm}
+        {$if not(defined(sparc)) and not(defined(arm)) and not(defined(avr)) and not(defined(mips))}
         locals : longint;
         locals : longint;
-{$endif arm}
+        {$endif}
         srsym : tsym;
         srsym : tsym;
       begin
       begin
          if parse_generic then
          if parse_generic then

+ 2 - 0
compiler/psub.pas

@@ -964,11 +964,13 @@ implementation
       end;
       end;
 
 
 
 
+{$if defined(i386) or defined(x86_64) or defined(arm)}
     const
     const
       exception_flags: array[boolean] of tprocinfoflags = (
       exception_flags: array[boolean] of tprocinfoflags = (
         [],
         [],
         [pi_uses_exceptions,pi_needs_implicit_finally,pi_has_implicit_finally]
         [pi_uses_exceptions,pi_needs_implicit_finally,pi_has_implicit_finally]
       );
       );
+{$endif}
 
 
     procedure tcgprocinfo.setup_tempgen;
     procedure tcgprocinfo.setup_tempgen;
       begin
       begin

+ 1 - 1
compiler/systems/t_embed.pas

@@ -90,7 +90,7 @@ Var
   linklibc : boolean;
   linklibc : boolean;
   found1,
   found1,
   found2   : boolean;
   found2   : boolean;
-{$if defined(ARM) or defined(MIPSEL)}
+{$if defined(ARM)}
   LinkStr  : string;
   LinkStr  : string;
 {$endif}
 {$endif}
 begin
 begin