mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 20:49:09 +02:00
* access packed records with unaligned data accesses
git-svn-id: trunk@3365 -
This commit is contained in:
parent
c4c200fc7c
commit
5e4ff16934
@ -79,7 +79,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
systems,
|
systems,
|
||||||
cutils,verbose,globals,
|
cutils,verbose,globals,
|
||||||
symconst,symdef,symsym,defutil,paramgr,
|
symconst,symdef,symsym,symtable,defutil,paramgr,
|
||||||
aasmbase,aasmtai,aasmdata,
|
aasmbase,aasmtai,aasmdata,
|
||||||
procinfo,pass_2,parabase,
|
procinfo,pass_2,parabase,
|
||||||
pass_1,nld,ncon,nadd,nutils,
|
pass_1,nld,ncon,nadd,nutils,
|
||||||
@ -320,6 +320,13 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
inc(location.reference.offset,vs.fieldoffset);
|
inc(location.reference.offset,vs.fieldoffset);
|
||||||
|
{$ifdef SUPPORT_UNALIGNED}
|
||||||
|
{ packed? }
|
||||||
|
if (vs.owner.defowner.deftype in [recorddef,objectdef]) and
|
||||||
|
(tabstractrecordsymtable(vs.owner).usefieldalignment=1) then
|
||||||
|
location.reference.alignment:=1;
|
||||||
|
{$endif SUPPORT_UNALIGNED}
|
||||||
|
|
||||||
{ also update the size of the location }
|
{ also update the size of the location }
|
||||||
location.size:=def_cgsize(resulttype.def);
|
location.size:=def_cgsize(resulttype.def);
|
||||||
paraloc1.done;
|
paraloc1.done;
|
||||||
|
Loading…
Reference in New Issue
Block a user