Преглед на файлове

* fixed some unneeded 64 bit conversions + rarely triggered bug on x86
regarding packed records/arrays

git-svn-id: trunk@5790 -

Jonas Maebe преди 18 години
родител
ревизия
1ad6417f7f
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      compiler/cgobj.pas

+ 3 - 2
compiler/cgobj.pas

@@ -1047,7 +1047,7 @@ implementation
          bitmask := not(((aword(1) shl stopbit)-1) xor ((aword(1) shl sreg.startbit)-1))
        else
          bitmask := (aword(1) shl sreg.startbit) - 1;
-       if (((a shl sreg.startbit) and not bitmask) <> not bitmask) then
+       if (((aword(a) shl sreg.startbit) and not bitmask) <> not bitmask) then
          a_op_const_reg(list,OP_AND,sreg.subsetregsize,aint(bitmask),sreg.subsetreg);
        a_op_const_reg(list,OP_OR,sreg.subsetregsize,aint((aword(a) shl sreg.startbit) and not(bitmask)),sreg.subsetreg);
     end;
@@ -1665,8 +1665,9 @@ implementation
       begin
         slopt := SL_REGNOSRCMASK;
         if (
-            (a = (aword(1) shl sref.bitlen) -1) or
             { broken x86 "x shl regbitsize = x" }
+            ((sref.bitlen <> AIntBits) and
+             (aword(a) = (aword(1) shl sref.bitlen) -1)) or
             ((sref.bitlen = AIntBits) and
              (a = -1))
            ) then