Explorar o código

* m68k: fixed extension in a_load_ref_reg. Existing code cleans only bits 16-31 when loading a 8-bit register from 16-bit reference, and leaves garbage in bits 8-15.

git-svn-id: trunk@28256 -
sergei %!s(int64=11) %!d(string=hai) anos
pai
achega
dac52f503c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      compiler/m68k/cgcpu.pas

+ 1 - 1
compiler/m68k/cgcpu.pas

@@ -923,7 +923,7 @@ unit cgcpu;
            size:=tosize;
          list.concat(taicpu.op_ref_reg(A_MOVE,TCGSize2OpSize[size],href,register));
          { extend the value in the register }
-         sign_extend(list, fromsize, register);
+         sign_extend(list, size, register);
       end;