Ver código fonte

* Small optimization.

git-svn-id: trunk@10692 -
yury 17 anos atrás
pai
commit
9222540e84
1 arquivos alterados com 4 adições e 3 exclusões
  1. 4 3
      compiler/arm/cgcpu.pas

+ 4 - 3
compiler/arm/cgcpu.pas

@@ -1052,12 +1052,13 @@ unit cgcpu;
                OS_S8:
                OS_S8:
                  begin
                  begin
                    do_shift(SM_LSL,24,reg1);
                    do_shift(SM_LSL,24,reg1);
-                   do_shift(SM_ASR,24,reg2);
                    if tosize=OS_16 then
                    if tosize=OS_16 then
                      begin
                      begin
-                       do_shift(SM_LSL,16,reg1);
+                       do_shift(SM_ASR,8,reg2);
                        do_shift(SM_LSR,16,reg2);
                        do_shift(SM_LSR,16,reg2);
-                     end;
+                     end
+                   else
+                     do_shift(SM_ASR,24,reg2);
                  end;
                  end;
                OS_16:
                OS_16:
                  begin
                  begin