Przeglądaj źródła

* yet another 8/16-bit ALU fix in thlcg2ll.location_force_reg

git-svn-id: branches/i8086@23887 -
nickysn 12 lat temu
rodzic
commit
cbf3b14e20
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      compiler/hlcg2ll.pas

+ 6 - 1
compiler/hlcg2ll.pas

@@ -1127,7 +1127,12 @@ implementation
                 if (TCGSize2Size[dst_cgsize]<TCGSize2Size[l.size]) then
                  begin
                    if (l.loc in [LOC_REGISTER,LOC_CREGISTER]) then
-                     l.register:=cg.makeregsize(list,l.register,dst_cgsize);
+                     begin
+{$if defined(cpu8bitalu) or defined(cpu16bitalu)}
+                       if TCGSize2Size[dst_cgsize]<=TCGSize2Size[OS_INT] then
+{$endif}
+                         l.register:=cg.makeregsize(list,l.register,dst_cgsize);
+                     end;
                    { for big endian systems, the reference's offset must }
                    { be increased in this case, since they have the      }
                    { MSB first in memory and e.g. byte(word_var) should  }