amiga: remove packed from RTL OS record/structure definitions, use PACKRECORDS 2 instead. this allows much better code to be generated for a plain 68000 RTL

git-svn-id: trunk@44343 -
This commit is contained in:
Károly Balogh 2020-03-23 00:05:52 +00:00
parent 637ede6879
commit cd76003b4d
3 changed files with 44 additions and 41 deletions

View File

@ -23,10 +23,11 @@
********************************************************************* *********************************************************************
* } * }
{$PACKRECORDS 2}
type type
PNode = ^TNode; PNode = ^TNode;
TNode = packed record TNode = record
ln_Succ: PNode; ln_Succ: PNode;
ln_Pred: PNode; ln_Pred: PNode;
ln_Type: Byte; ln_Type: Byte;
@ -36,7 +37,7 @@ type
type type
PMinNode = ^TMinNode; PMinNode = ^TMinNode;
TMinNode = packed record TMinNode = record
mln_Succ: PMinNode; mln_Succ: PMinNode;
mln_Pred: PMinNode; mln_Pred: PMinNode;
end; end;
@ -75,7 +76,7 @@ const
type type
PList = ^TList; PList = ^TList;
TList = packed record TList = record
lh_Head : PNode; lh_Head : PNode;
lh_Tail : PNode; lh_Tail : PNode;
lh_TailPred: PNode; lh_TailPred: PNode;
@ -85,7 +86,7 @@ type
type type
PMinList = ^TMinList; PMinList = ^TMinList;
TMinList = packed record TMinList = record
mlh_Head : PMinNode; mlh_Head : PMinNode;
mlh_Tail : PMinNode; mlh_Tail : PMinNode;
mlh_TailPred: PMinNode; mlh_TailPred: PMinNode;
@ -422,7 +423,7 @@ const
type type
PResident = ^TResident; PResident = ^TResident;
TResident = packed record TResident = record
rt_MatchWord: Word; rt_MatchWord: Word;
rt_MatchTag : PResident; rt_MatchTag : PResident;
rt_EndSkip : Pointer; rt_EndSkip : Pointer;
@ -468,14 +469,14 @@ const
type type
PMemChunk = ^TMemChunk; PMemChunk = ^TMemChunk;
TMemChunk = packed record TMemChunk = record
nc_Next : PMemChunk; nc_Next : PMemChunk;
nc_Bytes: DWord; nc_Bytes: DWord;
end; end;
type type
PMemHeader = ^TMemHeader; PMemHeader = ^TMemHeader;
TMemHeader = packed record TMemHeader = record
mh_Node : TNode; mh_Node : TNode;
mh_Attributes: Word; mh_Attributes: Word;
mh_First : PMemChunk; mh_First : PMemChunk;
@ -486,8 +487,8 @@ type
type type
PMemEntry = ^TMemEntry; PMemEntry = ^TMemEntry;
TMemEntry = packed record TMemEntry = record
me_Un: packed record me_Un: record
case Byte of case Byte of
0 : (meu_Reqs: DWord); 0 : (meu_Reqs: DWord);
1 : (meu_Addr: Pointer) 1 : (meu_Addr: Pointer)
@ -497,7 +498,7 @@ type
type type
PMemList = ^TMemList; PMemList = ^TMemList;
TMemList = packed record TMemList = record
ml_Node : TNode; ml_Node : TNode;
ml_NumEntries: Word; ml_NumEntries: Word;
ml_ME : array [0..0] of TMemEntry; ml_ME : array [0..0] of TMemEntry;
@ -527,7 +528,7 @@ const
type type
PMemHandlerData = ^TMemHandlerData; PMemHandlerData = ^TMemHandlerData;
TMemHandlerData = packed record TMemHandlerData = record
memh_RequestSize : DWord; memh_RequestSize : DWord;
memh_RequestFlags: DWord; memh_RequestFlags: DWord;
memh_Flags : DWord; memh_Flags : DWord;
@ -550,7 +551,7 @@ const
type type
PMsgPort = ^TMsgPort; PMsgPort = ^TMsgPort;
TMsgPort = packed record TMsgPort = record
mp_Node : TNode; mp_Node : TNode;
mp_Flags : Byte; mp_Flags : Byte;
mp_SigBit : Byte; mp_SigBit : Byte;
@ -568,7 +569,7 @@ const
type type
PMessage = ^TMessage; PMessage = ^TMessage;
TMessage = packed record TMessage = record
mn_Node : TNode; mn_Node : TNode;
mn_ReplyPort: PMsgPort; mn_ReplyPort: PMsgPort;
mn_Length : Word; mn_Length : Word;
@ -583,7 +584,7 @@ type
type type
PTask = ^TTask; PTask = ^TTask;
TTask = packed record TTask = record
tc_Node : TNode; tc_Node : TNode;
tc_Flags : Byte; tc_Flags : Byte;
tc_State : Byte; tc_State : Byte;
@ -655,7 +656,7 @@ const
type type
PTaskTrapMessage = ^TTaskTrapMessage; PTaskTrapMessage = ^TTaskTrapMessage;
TTaskTrapMessage = packed record TTaskTrapMessage = record
Message: TMessage; { * Message Header * } Message: TMessage; { * Message Header * }
Task : TTask; { * connected Task * } Task : TTask; { * connected Task * }
Version: DWord; { * version of the structure * } Version: DWord; { * version of the structure * }
@ -675,7 +676,7 @@ const
type type
PETask = ^TETask; PETask = ^TETask;
TETask = packed record TETask = record
Message : TMessage; Message : TMessage;
Parent : PTask; Parent : PTask;
UniqueID : DWord; UniqueID : DWord;
@ -732,7 +733,7 @@ type
type type
PTaskInitExtension = ^TTaskInitExtension; PTaskInitExtension = ^TTaskInitExtension;
TTaskInitExtension = packed record TTaskInitExtension = record
{ * Must be filled with TRAP_PPCTASK { * Must be filled with TRAP_PPCTASK
* } * }
Trap : Word; Trap : Word;
@ -855,15 +856,15 @@ const
* } * }
type type
PStackSwapStruct = ^TStackSwapStruct; PStackSwapStruct = ^TStackSwapStruct;
TStackSwapStruct = packed record TStackSwapStruct = record
stk_Lower : Pointer; { * Lowest byte of stack * } stk_Lower : Pointer; { * Lowest byte of stack * }
stk_Upper : Pointer; { * Upper end of stack (size + Lowert) * } stk_Upper : Pointer; { * Upper end of stack (size + Lowert) * }
stk_Pointer: Pointer; { * Stack pointer at switch point * } stk_Pointer: Pointer; { * Stack pointer at switch point * }
end; end;
type type
PPPCStackSwapArgs = ^TPPCStackSwapArgs; PPPCStackSwapArgs = ^TPPCStackSwapArgs;
TPPCStackSwapArgs = packed record TPPCStackSwapArgs = record
Args: Array[0..7] Of DWord; { * The C register arguments from gpr3..gpr11 * } Args: Array[0..7] Of DWord; { * The C register arguments from gpr3..gpr11 * }
end; end;
@ -952,7 +953,7 @@ const
* } * }
type type
PTaskFrame68k = ^TTaskFrame68k; PTaskFrame68k = ^TTaskFrame68k;
TTaskFrame68k = packed record TTaskFrame68k = record
PC: Pointer; PC: Pointer;
SR: Word; SR: Word;
Xn: Array[0..14] Of LongInt; Xn: Array[0..14] Of LongInt;
@ -976,7 +977,7 @@ const
type type
PInterrupt = ^TInterrupt; PInterrupt = ^TInterrupt;
TInterrupt = packed record TInterrupt = record
is_Node: TNode; is_Node: TNode;
is_Data: Pointer; is_Data: Pointer;
is_Code: Pointer; is_Code: Pointer;
@ -984,7 +985,7 @@ type
type type
PIntVector = ^TIntVector; PIntVector = ^TIntVector;
TIntVector = packed record TIntVector = record
iv_Data: Pointer; iv_Data: Pointer;
iv_Code: Pointer; iv_Code: Pointer;
iv_Node: PNode; iv_Node: PNode;
@ -992,7 +993,7 @@ type
type type
PSoftIntList = ^TSoftIntList; PSoftIntList = ^TSoftIntList;
TSoftIntList = packed record TSoftIntList = record
sh_List: TList; sh_List: TList;
sh_Pad : Word; sh_Pad : Word;
end; end;
@ -1016,14 +1017,14 @@ const
* } * }
type type
PSemaphoreRequest = ^TSemaphoreRequest; PSemaphoreRequest = ^TSemaphoreRequest;
TSemaphoreRequest = packed record TSemaphoreRequest = record
sr_Link : TMinNode; sr_Link : TMinNode;
sr_Waiter: PTask; sr_Waiter: PTask;
end; end;
type type
PSignalSemaphore = ^TSignalSemaphore; PSignalSemaphore = ^TSignalSemaphore;
TSignalSemaphore = packed record TSignalSemaphore = record
ss_Link : TNode; ss_Link : TNode;
ss_NestCount : SmallInt; ss_NestCount : SmallInt;
ss_WaitQueue : TMinList; ss_WaitQueue : TMinList;
@ -1034,7 +1035,7 @@ type
type type
PSemaphoreMessage = ^TSemaphoreMessage; PSemaphoreMessage = ^TSemaphoreMessage;
TSemaphoreMessage = packed record TSemaphoreMessage = record
ssm_Message : TMessage; ssm_Message : TMessage;
ssm_Semaphore: PSignalSemaphore; ssm_Semaphore: PSignalSemaphore;
end; end;
@ -1079,7 +1080,7 @@ const
type type
PLibrary = ^TLibrary; PLibrary = ^TLibrary;
TLibrary = packed record TLibrary = record
lib_Node : TNode; lib_Node : TNode;
lib_Flags : Byte; lib_Flags : Byte;
lib_pad : Byte; lib_pad : Byte;
@ -1257,13 +1258,13 @@ const
{ {
type type
PFuncEntry = ^TFuncEntry; PFuncEntry = ^TFuncEntry;
TFuncEntry = packed record TFuncEntry = record
EmulLibEntry : TEmulLibEntry; EmulLibEntry : TEmulLibEntry;
OldFunction : Pointer; { * Needed for bookkeeping * } OldFunction : Pointer; { * Needed for bookkeeping * }
end; end;
PFuncOldEntry = ^TFuncOldEntry; PFuncOldEntry = ^TFuncOldEntry;
TFuncOldEntry = packed record TFuncOldEntry = record
Command : Word; Command : Word;
FuncEntry: PFuncEntry; FuncEntry: PFuncEntry;
end; end;
@ -1413,13 +1414,13 @@ const
type type
PDevice = ^TDevice; PDevice = ^TDevice;
TDevice = packed record TDevice = record
dd_Library: TLibrary; dd_Library: TLibrary;
end; end;
type type
PUnit = ^TUnit; PUnit = ^TUnit;
TUnit = packed record TUnit = record
unit_MsgPort: TMsgPort; unit_MsgPort: TMsgPort;
unit_flags : Byte; unit_flags : Byte;
unit_pad : Byte; unit_pad : Byte;
@ -1440,7 +1441,7 @@ const
type type
PIORequest = ^TIORequest; PIORequest = ^TIORequest;
TIORequest = packed record TIORequest = record
io_Message: TMessage; io_Message: TMessage;
io_Device : PDevice; io_Device : PDevice;
io_Unit : PUnit; io_Unit : PUnit;
@ -1451,7 +1452,7 @@ type
type type
PIOStdReq = ^TIOStdReq; PIOStdReq = ^TIOStdReq;
TIOStdReq = packed record TIOStdReq = record
io_Message: TMessage; io_Message: TMessage;
io_Device : PDevice; io_Device : PDevice;
io_Unit : PUnit; io_Unit : PUnit;
@ -1492,7 +1493,7 @@ const
type type
PExecBase = ^TExecBase; PExecBase = ^TExecBase;
TExecBase = packed record TExecBase = record
LIbNode : TLibrary; LIbNode : TLibrary;
SoftVer : Word; SoftVer : Word;
LowMemChkSum: SmallInt; LowMemChkSum: SmallInt;
@ -1705,7 +1706,7 @@ const
* } * }
type type
PExecNotifyMessage = ^TExecNotifyMessage; PExecNotifyMessage = ^TExecNotifyMessage;
TExecNotifyMessage = packed record TExecNotifyMessage = record
MType : DWord; MType : DWord;
Flags : DWord; Flags : DWord;
Extra : DWord; Extra : DWord;

View File

@ -21,10 +21,11 @@
********************************************************************* *********************************************************************
* } * }
{$PACKRECORDS 2}
type type
PClockData = ^TClockData; PClockData = ^TClockData;
TClockData = packed record TClockData = record
sec : Word; sec : Word;
min : Word; min : Word;
hour : Word; hour : Word;
@ -47,7 +48,7 @@ type
type type
PPTagItem = ^PTagItem; PPTagItem = ^PTagItem;
PTagItem = ^TTagItem; PTagItem = ^TTagItem;
TTagItem = packed record TTagItem = record
ti_Tag : Tag; ti_Tag : Tag;
ti_Data: Cardinal; ti_Data: Cardinal;
end; end;
@ -80,7 +81,7 @@ const
type type
PNamedObject = ^TNamedObject; PNamedObject = ^TNamedObject;
TNamedObject = packed record TNamedObject = record
no_Object: Pointer; no_Object: Pointer;
end; end;

View File

@ -21,6 +21,7 @@
********************************************************************* *********************************************************************
* } * }
{$PACKRECORDS 2}
const const
UtilityName = 'utility.library'; UtilityName = 'utility.library';
@ -28,7 +29,7 @@ const
type type
PUtilityBase = ^TUtilityName; PUtilityBase = ^TUtilityName;
TUtilityName = packed record TUtilityName = record
ub_LibNode : TLibrary; ub_LibNode : TLibrary;
ub_Language: Byte; ub_Language: Byte;
ub_Reserved: Byte; ub_Reserved: Byte;
@ -43,7 +44,7 @@ type
type type
PHook = ^THook; PHook = ^THook;
THook = packed record THook = record
h_MinNode : TMinNode; h_MinNode : TMinNode;
h_Entry : Cardinal; h_Entry : Cardinal;
h_SubEntry: Cardinal; h_SubEntry: Cardinal;