* 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 -
This commit is contained in:
Jonas Maebe 2015-12-02 22:24:04 +00:00
parent 00d97d54ca
commit 86b02cf76e
2 changed files with 2 additions and 4 deletions

View File

@ -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(

View File

@ -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);