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/mips/cpuelf.pas b/compiler/mips/cpuelf.pas index b3d0dcf7ad..720bc0aea6 100644 --- a/compiler/mips/cpuelf.pas +++ b/compiler/mips/cpuelf.pas @@ -739,15 +739,15 @@ implementation if (lowreloc.ftype=R_MIPS_LO16) then begin; found:=true; + objsec.Data.Seek(objreloc.DataOffset); + objsec.Data.Read(hipart,sizeof(hipart)); + objsec.Data.Seek(lowreloc.DataOffset); + objsec.Data.Read(lopart,sizeof(lopart)); break; end; end; if not found then InternalError(2013030102); - objsec.Data.Seek(objreloc.DataOffset); - objsec.Data.Read(hipart,sizeof(hipart)); - objsec.Data.Seek(lowreloc.DataOffset); - objsec.Data.Read(lopart,sizeof(lopart)); if (source_info.endian<>target_info.endian) then begin hipart:=swapendian(hipart);