Explorar o código

Fix off by 8 error.

git-svn-id: trunk@30393 -
Jeppe Johansen %!s(int64=10) %!d(string=hai) anos
pai
achega
8c105d4c97
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      compiler/avr/cgcpu.pas

+ 2 - 2
compiler/avr/cgcpu.pas

@@ -322,10 +322,10 @@ unit cgcpu;
               internalerror(2014011105);
               internalerror(2014011105);
              case hp^.loc of
              case hp^.loc of
                LOC_REGISTER,LOC_CREGISTER:
                LOC_REGISTER,LOC_CREGISTER:
-                 a_load_const_reg(list,hp^.size,(a shr (i-1)) and $ff,hp^.register);
+                 a_load_const_reg(list,hp^.size,(a shr (8*(i-1))) and $ff,hp^.register);
                LOC_REFERENCE,LOC_CREFERENCE:
                LOC_REFERENCE,LOC_CREFERENCE:
                  begin
                  begin
-                   list.concat(taicpu.op_const(A_PUSH,(a shr (i-1)) and $ff));
+                   list.concat(taicpu.op_const(A_PUSH,(a shr (8*(i-1))) and $ff));
                  end;
                  end;
                else
                else
                  internalerror(2002071004);
                  internalerror(2002071004);