diff options
Diffstat (limited to 'compiler/avr')
-rw-r--r-- | compiler/avr/aasmcpu.pas | 10 | ||||
-rw-r--r-- | compiler/avr/agavrgas.pas | 10 | ||||
-rw-r--r-- | compiler/avr/cpuinfo.pas | 6 | ||||
-rw-r--r-- | compiler/avr/cpupara.pas | 8 | ||||
-rw-r--r-- | compiler/avr/navradd.pas | 12 | ||||
-rw-r--r-- | compiler/avr/navrmat.pas | 4 | ||||
-rw-r--r-- | compiler/avr/raavrgas.pas | 2 |
7 files changed, 32 insertions, 20 deletions
diff --git a/compiler/avr/aasmcpu.pas b/compiler/avr/aasmcpu.pas index 274e06af9d..4bb7284ea8 100644 --- a/compiler/avr/aasmcpu.pas +++ b/compiler/avr/aasmcpu.pas @@ -246,11 +246,11 @@ implementation begin result:=operand_read; case opcode of - A_CLR, - A_MOV, A_MOVW: - if opnr=0 then - result:=operand_write; - A_CP,A_CPC,A_CPI,A_PUSH : + A_CLR,A_LDD,A_LD,A_LDI,A_LDS, + A_MOV,A_MOVW: + if opnr=0 then + result:=operand_write; + A_CP,A_CPC,A_CPI,A_PUSH,A_ST,A_STD,A_STS: ; else begin diff --git a/compiler/avr/agavrgas.pas b/compiler/avr/agavrgas.pas index 2e0d5bc0fc..94973eb0f6 100644 --- a/compiler/avr/agavrgas.pas +++ b/compiler/avr/agavrgas.pas @@ -81,6 +81,7 @@ unit agavrgas; var s : string; begin + s:=''; with ref do begin {$ifdef extdebug} @@ -95,9 +96,8 @@ unit agavrgas; else if base<>NR_NO then begin if addressmode=AM_PREDRECEMENT then - s:='-' - else - s:=''; + s:='-'; + case base of NR_R26: s:=s+'X'; @@ -119,9 +119,7 @@ unit agavrgas; else if assigned(symbol) or (offset<>0) then begin if assigned(symbol) then - s:=ReplaceForbiddenAsmSymbolChars(symbol.name) - else - s:=''; + s:=ReplaceForbiddenAsmSymbolChars(symbol.name); if offset<0 then s:=s+tostr(offset) diff --git a/compiler/avr/cpuinfo.pas b/compiler/avr/cpuinfo.pas index e15fadfc0f..eec89b73a2 100644 --- a/compiler/avr/cpuinfo.pas +++ b/compiler/avr/cpuinfo.pas @@ -21,6 +21,9 @@ Interface Type bestreal = double; +{$if FPC_FULLVERSION>20700} + bestrealrec = TDoubleRec; +{$endif FPC_FULLVERSION>20700} ts32real = single; ts64real = double; ts80real = type extended; @@ -61,6 +64,9 @@ Type ); Const + { Is there support for dealing with multiple microcontrollers available } + { for this platform? } + ControllerSupport = true; {# Size of native extended floating point type } extended_size = 12; {# Size of a multimedia register } diff --git a/compiler/avr/cpupara.pas b/compiler/avr/cpupara.pas index 73b8fde17d..d1353ff7bb 100644 --- a/compiler/avr/cpupara.pas +++ b/compiler/avr/cpupara.pas @@ -201,13 +201,13 @@ unit cpupara; begin { In case of po_delphi_nested_cc, the parent frame pointer is always passed on the stack. } - if (nextintreg>RS_R8) and + if (nextintreg>RS_R7) and (not(vo_is_parentfp in hp.varoptions) or not(po_delphi_nested_cc in p.procoptions)) then begin paraloc^.loc:=LOC_REGISTER; paraloc^.register:=newreg(R_INTREGISTER,nextintreg,R_SUBWHOLE); - inc(nextintreg); + dec(nextintreg); end else begin @@ -251,8 +251,8 @@ unit cpupara; begin paradef:=getpointerdef(paradef); loc:=LOC_REGISTER; - paracgsize := OS_ADDR; - paralen := tcgsize2size[OS_ADDR]; + paracgsize:=OS_ADDR; + paralen:=tcgsize2size[OS_ADDR]; end else begin diff --git a/compiler/avr/navradd.pas b/compiler/avr/navradd.pas index 3cf3270466..8a54171cab 100644 --- a/compiler/avr/navradd.pas +++ b/compiler/avr/navradd.pas @@ -77,6 +77,8 @@ interface GetResFlags:=F_LT; gten: GetResFlags:=F_NotPossible; + else + internalerror(2014082020); end else case NodeType of @@ -88,6 +90,8 @@ interface GetResFlags:=F_NotPossible; gten: GetResFlags:=F_GE; + else + internalerror(2014082021); end; end else @@ -102,6 +106,8 @@ interface GetResFlags:=F_CC; gten: GetResFlags:=F_NotPossible; + else + internalerror(2014082022); end else case NodeType of @@ -113,6 +119,8 @@ interface GetResFlags:=F_NotPossible; gten: GetResFlags:=F_CS; + else + internalerror(2014082023); end; end; end; @@ -220,7 +228,7 @@ interface function tavraddnode.pass_1 : tnode; begin result:=inherited pass_1; -{ +{$ifdef dummy} if not(assigned(result)) then begin unsigned:=not(is_signed(left.resultdef)) or @@ -240,7 +248,7 @@ interface is_dynamic_array(left.resultdef) ) then expectloc:=LOC_FLAGS; -} +{$endif dummy} end; diff --git a/compiler/avr/navrmat.pas b/compiler/avr/navrmat.pas index b724b76383..802e3d0443 100644 --- a/compiler/avr/navrmat.pas +++ b/compiler/avr/navrmat.pas @@ -165,7 +165,7 @@ implementation secondpass(right); location_copy(location,left.location); -{ +{$ifdef dummy} { put numerator in register } size:=def_cgsize(left.resultdef); hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location, @@ -201,7 +201,7 @@ implementation { simple comparison with 0) } if is_signed(right.resultdef) then cg.g_overflowcheck(current_asmdata.CurrAsmList,location,resultdef); -} +{$endif dummy} end; {***************************************************************************** diff --git a/compiler/avr/raavrgas.pas b/compiler/avr/raavrgas.pas index 64b8d1a80c..169da45d6e 100644 --- a/compiler/avr/raavrgas.pas +++ b/compiler/avr/raavrgas.pas @@ -617,7 +617,7 @@ Unit raavrgas; actopcode:=A_NONE; for j:=maxlen downto 1 do begin - actopcode:=tasmop(PtrInt(iasmops.Find(copy(hs,1,j)))); + actopcode:=tasmop(PtrUInt(iasmops.Find(copy(hs,1,j)))); if actopcode<>A_NONE then begin actasmtoken:=AS_OPCODE; |