mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 17:30:38 +02:00
rtti: make aligntoqword to always align to the same size as typinfo/AlignTypeData. this fixes m68k crashes in RTTI after r35218
git-svn-id: trunk@35228 -
This commit is contained in:
parent
f69bfe0ee4
commit
233185a4e5
@ -445,11 +445,14 @@ function aligntoptr(p : pointer) : pointer;inline;
|
|||||||
|
|
||||||
|
|
||||||
function aligntoqword(p : pointer) : pointer;inline;
|
function aligntoqword(p : pointer) : pointer;inline;
|
||||||
|
{$push}
|
||||||
|
{$packrecords c}
|
||||||
type
|
type
|
||||||
TAlignCheck = record
|
TAlignCheck = record
|
||||||
b : byte;
|
b : byte;
|
||||||
q : qword;
|
q : qword;
|
||||||
end;
|
end;
|
||||||
|
{$pop}
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
||||||
result:=align(p,PtrInt(@TAlignCheck(nil^).q))
|
result:=align(p,PtrInt(@TAlignCheck(nil^).q))
|
||||||
|
Loading…
Reference in New Issue
Block a user