Move Int128Rec to System; remove i386 and x86_64 CPU unit dependency on SysUtils.

This commit is contained in:
Rika Ichinose 2024-07-15 01:45:05 +03:00 committed by Michael Van Canneyt
parent e86882580d
commit a575a5c0fd
4 changed files with 13 additions and 27 deletions

View File

@ -21,14 +21,6 @@ unit cpu;
interface
{$IFDEF FPC_DOTTEDUNITS}
uses
System.SysUtils;
{$ELSE FPC_DOTTEDUNITS}
uses
sysutils;
{$ENDIF FPC_DOTTEDUNITS}
{ returns true, if the processor supports the cpuid instruction }
function cpuid_support : boolean;

View File

@ -788,6 +788,18 @@ type
(* means that default handling should be used. *)
TCtrlBreakHandler = function (CtrlBreak: boolean): boolean;
Int128Rec = packed record
case integer of
{$ifdef FPC_LITTLE_ENDIAN}
0 : (Lo,Hi : QWord);
{$else FPC_LITTLE_ENDIAN}
0 : (Hi,Lo : QWord);
{$endif FPC_LITTLE_ENDIAN}
1 : (DWords : Array[0..3] of DWord);
2 : (Words : Array[0..7] of Word);
3 : (Bytes : Array[0..15] of Byte);
end;
{ Numbers for routines that have compiler magic }
{$I innr.inc}

View File

@ -81,17 +81,7 @@ type
2 : (Bytes : Array[0..7] of Byte);
end;
Int128Rec = packed record
case integer of
{$ifdef FPC_LITTLE_ENDIAN}
0 : (Lo,Hi : QWord);
{$else FPC_LITTLE_ENDIAN}
0 : (Hi,Lo : QWord);
{$endif FPC_LITTLE_ENDIAN}
1 : (DWords : Array[0..3] of DWord);
2 : (Words : Array[0..7] of Word);
3 : (Bytes : Array[0..15] of Byte);
end;
Int128Rec = System.Int128Rec;
OWordRec = packed record
case integer of

View File

@ -27,14 +27,6 @@ unit cpu;
{$endif}
{$endif}
{$IFDEF FPC_DOTTEDUNITS}
uses
System.SysUtils;
{$ELSE FPC_DOTTEDUNITS}
uses
sysutils;
{$ENDIF FPC_DOTTEDUNITS}
type
TCpuidResult = record
eax, ebx, ecx, edx: uint32;