diff --git a/compiler/aoptobj.pas b/compiler/aoptobj.pas index aade258ba3..393a14f1ac 100644 --- a/compiler/aoptobj.pas +++ b/compiler/aoptobj.pas @@ -1221,8 +1221,11 @@ Unit AoptObj; the level parameter denotes how deeep we have already followed the jump, 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; + {$endif} begin GetfinalDestination := false; diff --git a/compiler/mips/cpugas.pas b/compiler/mips/cpugas.pas index afbda424f9..93ea844e1a 100644 --- a/compiler/mips/cpugas.pas +++ b/compiler/mips/cpugas.pas @@ -235,10 +235,10 @@ unit cpugas; procedure TMIPSInstrWriter.WriteInstruction(hp: Tai); var Op: TAsmOp; - s,s1: string; + s: string; i: integer; tmpfpu: string; - tmpfpu_len: longint; + //tmpfpu_len: longint; r: TRegister; begin if hp.typ <> ait_instruction then @@ -357,6 +357,7 @@ unit cpugas; const +{$ifdef MIPSEL} as_MIPSEL_as_info: tasminfo = ( id: as_gas; @@ -369,6 +370,7 @@ unit cpugas; comment: '# '; dollarsign: '$'; ); +{$else MIPSEL} as_MIPSEB_as_info: tasminfo = ( id: as_gas; @@ -381,6 +383,7 @@ unit cpugas; comment: '# '; dollarsign: '$'; ); +{$endif MIPSEL} begin {$ifdef MIPSEL} diff --git a/compiler/mips/itcpugas.pas b/compiler/mips/itcpugas.pas index be75b61bdc..ad9f766d2f 100644 --- a/compiler/mips/itcpugas.pas +++ b/compiler/mips/itcpugas.pas @@ -52,7 +52,7 @@ const function findreg_by_gasname(const s: string): tregisterindex; var - i, p: tregisterindex; + p: tregisterindex; begin for p := low(tregisterindex) to high(tregisterindex) do begin diff --git a/compiler/mips/ncpuadd.pas b/compiler/mips/ncpuadd.pas index 5e438f0c94..99589f567f 100644 --- a/compiler/mips/ncpuadd.pas +++ b/compiler/mips/ncpuadd.pas @@ -267,7 +267,6 @@ procedure tmipsaddnode.second_cmpfloat; var op: tasmop; lreg,rreg: tregister; - ai: Taicpu; begin pass_left_right; if nf_swapped in flags then diff --git a/compiler/mips/ncpuset.pas b/compiler/mips/ncpuset.pas index cbc7370e54..c93e88949a 100644 --- a/compiler/mips/ncpuset.pas +++ b/compiler/mips/ncpuset.pas @@ -67,7 +67,7 @@ procedure tcpucasenode.genjumptable(hp: pcaselabel; min_, max_: aint); var table: tasmlabel; last: TConstExprInt; - indexreg, jmpreg, basereg: tregister; + indexreg, jmpreg: tregister; href: treference; jumpsegment: TAsmlist; opcgsize: tcgsize; diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index d98b3f7088..edd2663242 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -785,7 +785,7 @@ implementation sizeleft : aint; tempref : treference; {$ifdef mips} - tmpreg : tregister; + //tmpreg : tregister; {$endif mips} {$ifndef cpu64bitalu} tempreg : tregister; diff --git a/compiler/ogelf.pas b/compiler/ogelf.pas index 1d42396821..eb3f65c0b8 100644 --- a/compiler/ogelf.pas +++ b/compiler/ogelf.pas @@ -3275,7 +3275,9 @@ implementation pltreltags: array[boolean] of longword=(DT_REL,DT_RELA); relsztags: array[boolean] of longword=(DT_RELSZ,DT_RELASZ); relenttags: array[boolean] of longword=(DT_RELENT,DT_RELAENT); + {$ifndef MIPS} relcnttags: array[boolean] of longword=(DT_RELCOUNT,DT_RELACOUNT); + {$endif MIPS} procedure TElfExeOutput.FinishDynamicTags; var diff --git a/compiler/pstatmnt.pas b/compiler/pstatmnt.pas index 6d35e05057..458fdc6806 100644 --- a/compiler/pstatmnt.pas +++ b/compiler/pstatmnt.pas @@ -1398,9 +1398,9 @@ implementation function assembler_block : tnode; var p : tnode; -{$ifndef arm} + {$if not(defined(sparc)) and not(defined(arm)) and not(defined(avr)) and not(defined(mips))} locals : longint; -{$endif arm} + {$endif} srsym : tsym; begin if parse_generic then diff --git a/compiler/psub.pas b/compiler/psub.pas index a819593f40..a2088be7d8 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -964,11 +964,13 @@ implementation end; +{$if defined(i386) or defined(x86_64) or defined(arm)} const exception_flags: array[boolean] of tprocinfoflags = ( [], [pi_uses_exceptions,pi_needs_implicit_finally,pi_has_implicit_finally] ); +{$endif} procedure tcgprocinfo.setup_tempgen; begin diff --git a/compiler/systems/t_embed.pas b/compiler/systems/t_embed.pas index d8f89481c5..31163a026a 100644 --- a/compiler/systems/t_embed.pas +++ b/compiler/systems/t_embed.pas @@ -90,7 +90,7 @@ Var linklibc : boolean; found1, found2 : boolean; -{$if defined(ARM) or defined(MIPSEL)} +{$if defined(ARM)} LinkStr : string; {$endif} begin