浏览代码

* fixed DFA warnings for MIPS and AVR

git-svn-id: trunk@28502 -
Károly Balogh 11 年之前
父节点
当前提交
d22dc68fda
共有 2 个文件被更改,包括 8 次插入10 次删除
  1. 4 6
      compiler/avr/agavrgas.pas
  2. 4 4
      compiler/mips/cpuelf.pas

+ 4 - 6
compiler/avr/agavrgas.pas

@@ -81,6 +81,7 @@ unit agavrgas;
         var
         var
           s : string;
           s : string;
         begin
         begin
+           s:='';
            with ref do
            with ref do
             begin
             begin
   {$ifdef extdebug}
   {$ifdef extdebug}
@@ -95,9 +96,8 @@ unit agavrgas;
               else if base<>NR_NO then
               else if base<>NR_NO then
                 begin
                 begin
                   if addressmode=AM_PREDRECEMENT then
                   if addressmode=AM_PREDRECEMENT then
-                    s:='-'
-                  else
-                    s:='';
+                    s:='-';
+
                   case base of
                   case base of
                     NR_R26:
                     NR_R26:
                       s:=s+'X';
                       s:=s+'X';
@@ -119,9 +119,7 @@ unit agavrgas;
               else if assigned(symbol) or (offset<>0) then
               else if assigned(symbol) or (offset<>0) then
                 begin
                 begin
                   if assigned(symbol) then
                   if assigned(symbol) then
-                    s:=ReplaceForbiddenAsmSymbolChars(symbol.name)
-                  else
-                     s:='';
+                    s:=ReplaceForbiddenAsmSymbolChars(symbol.name);
 
 
                   if offset<0 then
                   if offset<0 then
                     s:=s+tostr(offset)
                     s:=s+tostr(offset)

+ 4 - 4
compiler/mips/cpuelf.pas

@@ -739,15 +739,15 @@ implementation
                     if (lowreloc.ftype=R_MIPS_LO16) then
                     if (lowreloc.ftype=R_MIPS_LO16) then
                       begin;
                       begin;
                         found:=true;
                         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;
                         break;
                       end;
                       end;
                   end;
                   end;
                 if not found then
                 if not found then
                   InternalError(2013030102);
                   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
                 if (source_info.endian<>target_info.endian) then
                   begin
                   begin
                     hipart:=swapendian(hipart);
                     hipart:=swapendian(hipart);