From 40212c8fcbc9071a7cd233387fcd7df781e7933c Mon Sep 17 00:00:00 2001 From: rich2014 Date: Sat, 3 Feb 2024 08:57:47 +0800 Subject: [PATCH] Revert "Designer/LCL: Correctly align TMethodNameTable/TMethodNameTableEntry on platforms that require it (e.g. AARCH64)." This reverts commit 8253bd9f8f84db386af898d154bef1a143c23ba7. --- components/jitclasses/demo/unit1.pas | 12 ++---------- designer/jitforms.pp | 12 ++---------- lcl/widgetset/wslclclasses.pp | 12 ++---------- 3 files changed, 6 insertions(+), 30 deletions(-) diff --git a/components/jitclasses/demo/unit1.pas b/components/jitclasses/demo/unit1.pas index 7b7d68f5fc..1b7e64f173 100644 --- a/components/jitclasses/demo/unit1.pas +++ b/components/jitclasses/demo/unit1.pas @@ -267,20 +267,12 @@ begin end; type - tmethodnamerec = -{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT} - packed -{$endif FPC_REQUIRES_PROPER_ALIGNMENT} - record + tmethodnamerec = packed record name : pshortstring; addr : codepointer; end; - tmethodnametable = -{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT} - packed -{$endif FPC_REQUIRES_PROPER_ALIGNMENT} - record + tmethodnametable = packed record count : dword; entries : packed array[0..0] of tmethodnamerec; end; diff --git a/designer/jitforms.pp b/designer/jitforms.pp index 4c6c8af60a..a0378d5bc0 100644 --- a/designer/jitforms.pp +++ b/designer/jitforms.pp @@ -386,20 +386,12 @@ const type // these definitions are copied from typinfo.pp - TMethodNameRec = -{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT} - packed -{$endif FPC_REQUIRES_PROPER_ALIGNMENT} - record + TMethodNameRec = packed record Name : PShortString; Addr : Pointer; end; - TMethodNameTable = -{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT} - packed -{$endif FPC_REQUIRES_PROPER_ALIGNMENT} - record + TMethodNameTable = packed record Count : DWord; // for runtime range checking it is important to give a range Entries : packed array[0..1000000] of TMethodNameRec; diff --git a/lcl/widgetset/wslclclasses.pp b/lcl/widgetset/wslclclasses.pp index 202ffa6c92..e090e12304 100644 --- a/lcl/widgetset/wslclclasses.pp +++ b/lcl/widgetset/wslclclasses.pp @@ -204,20 +204,12 @@ begin end; type - TMethodNameTableEntry = -{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT} - packed -{$endif FPC_REQUIRES_PROPER_ALIGNMENT} - record + TMethodNameTableEntry = packed record Name: PShortstring; Addr: Pointer; end; - TMethodNameTable = -{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT} - packed -{$endif FPC_REQUIRES_PROPER_ALIGNMENT} - record + TMethodNameTable = packed record Count: DWord; Entries: packed array[0..9999999] of TMethodNameTableEntry; end;