Bläddra i källkod

* handle bitpacked ordinal fields whose size is a multiple of 8 bits the same
other bitpacked ordinal fields, since they can also start on a non-byte-
aligned boundary

git-svn-id: trunk@32570 -

Jonas Maebe 9 år sedan
förälder
incheckning
86b02cf76e
2 ändrade filer med 2 tillägg och 4 borttagningar
  1. 1 2
      compiler/llvm/nllvmmem.pas
  2. 1 2
      compiler/symtable.pas

+ 1 - 2
compiler/llvm/nllvmmem.pas

@@ -75,8 +75,7 @@ implementation
             { typecast the result to the expected type, but don't actually index
               (that still has to be done by the generic code, so return false) }
             newbase:=hlcg.getaddressregister(current_asmdata.CurrAsmList,cpointerdef.getreusable(resultdef));
-            if is_ordinal(resultdef) and
-               (resultdef.packedbitsize mod 8<>0) then
+            if is_ordinal(resultdef) then
               fielddef:=
                 cgsize_orddef(
                   int_cgsize(

+ 1 - 2
compiler/symtable.pas

@@ -1835,8 +1835,7 @@ implementation
               { after the previous one, or at the next byte boundary. }
               if (curroffset<>fieldoffset) then
                 internalerror(2008051002);
-              if is_ordinal(vardef) and
-                 (vardef.packedbitsize mod 8 <> 0) then
+              if is_ordinal(vardef) then
                 begin
                   tmpsize:=vardef.packedbitsize;
                   sizectr:=((curroffset+tmpsize+7) shr 3)-((curroffset+7) shr 3);