Переглянути джерело

* fix arm(eb) load/store of smaller than register sizes

git-svn-id: trunk@10500 -
micha 17 роки тому
батько
коміт
6910b0ed40
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      compiler/arm/cgcpu.pas

+ 4 - 0
compiler/arm/cgcpu.pas

@@ -775,6 +775,8 @@ unit cgcpu;
          so : tshifterop;
          dir : integer;
        begin
+         if (TCGSize2Size[FromSize] >= TCGSize2Size[ToSize]) then
+           FromSize := ToSize;
          case ToSize of
            { signed integer registers }
            OS_8,
@@ -843,6 +845,8 @@ unit cgcpu;
          so : tshifterop;
          dir : integer;
        begin
+         if (TCGSize2Size[FromSize] >= TCGSize2Size[ToSize]) then
+           FromSize := ToSize;
          case FromSize of
            { signed integer registers }
            OS_8: