diff --git a/compiler/avr/cgcpu.pas b/compiler/avr/cgcpu.pas index dbd50b6ea8..72402d6552 100644 --- a/compiler/avr/cgcpu.pas +++ b/compiler/avr/cgcpu.pas @@ -309,7 +309,7 @@ unit cgcpu; procedure tcgavr.a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const paraloc : TCGPara); var - tmpref, ref: treference; + tmpref: treference; location: pcgparalocation; sizeleft: tcgint; i: Integer; @@ -326,7 +326,6 @@ unit cgcpu; a_load_ref_reg(list,location^.size,location^.size,tmpref,location^.register); LOC_REFERENCE: begin - ref:=tmpref; for i:=1 to sizeleft do begin tmpreg:=getintregister(list,OS_8); @@ -2442,7 +2441,7 @@ unit cgcpu; var countreg,tmpreg,tmpreg2: tregister; srcref,dstref : treference; - copysize,countregsize : tcgsize; + countregsize : tcgsize; l : TAsmLabel; i : longint; SrcQuickRef, DestQuickRef : Boolean; @@ -2458,7 +2457,6 @@ unit cgcpu; dstref.base:=NR_R26; dstref.addressmode:=AM_POSTINCREMENT; - copysize:=OS_8; if len<256 then countregsize:=OS_8 else if len<65536 then diff --git a/compiler/avr/cpupara.pas b/compiler/avr/cpupara.pas index 3c87f39225..45d6cd1c19 100644 --- a/compiler/avr/cpupara.pas +++ b/compiler/avr/cpupara.pas @@ -201,7 +201,6 @@ unit cpupara; paracgsize : tcgsize; paralen : longint; i : integer; - firstparaloc: boolean; procedure assignintreg; begin @@ -300,7 +299,6 @@ unit cpupara; if paralen=0 then internalerror(200410311); {$endif EXTDEBUG} - firstparaloc:=true; if loc=LOC_REGISTER then begin { the lsb is located in the register with the lowest number, @@ -386,7 +384,6 @@ unit cpupara; inc(paraloc^.reference.offset,2); end; end; - firstparaloc:=false; end; end; curfloatreg:=nextfloatreg; diff --git a/compiler/rgobj.pas b/compiler/rgobj.pas index 081a942dc5..c60d4faf48 100644 --- a/compiler/rgobj.pas +++ b/compiler/rgobj.pas @@ -1692,7 +1692,9 @@ unit rgobj; colourednodes : Tsuperregisterset; adj_colours:set of 0..255; found : boolean; +{$if declared(RS_STACK_POINTER_REG) and (RS_STACK_POINTER_REG<>RS_INVALID)} tmpr: tregister; +{$endif} begin spillednodes.clear; {Reset colours} @@ -1716,11 +1718,11 @@ unit rgobj; if supregset_in(colourednodes,a) and (reginfo[a].colour<=255) then include(adj_colours,reginfo[a].colour); end; + { e.g. AVR does not have a stack pointer register } +{$if declared(RS_STACK_POINTER_REG) and (RS_STACK_POINTER_REG<>RS_INVALID)} { FIXME: temp variable r is needed here to avoid Internal error 20060521 } { while compiling the compiler. } tmpr:=NR_STACK_POINTER_REG; - { e.g. AVR does not have a stack pointer register } -{$if declared(RS_STACK_POINTER_REG) and (RS_STACK_POINTER_REG<>RS_INVALID)} if (regtype=getregtype(tmpr)) then include(adj_colours,RS_STACK_POINTER_REG); {$ifend}