Browse Source

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

Rika Ichinose 1 year ago
parent
commit
a575a5c0fd
4 changed files with 13 additions and 27 deletions
  1. 0 8
      rtl/i386/cpu.pp
  2. 12 0
      rtl/inc/systemh.inc
  3. 1 11
      rtl/objpas/sysutils/sysutilh.inc
  4. 0 8
      rtl/x86_64/cpu.pp

+ 0 - 8
rtl/i386/cpu.pp

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

+ 12 - 0
rtl/inc/systemh.inc

@@ -788,6 +788,18 @@ type
 (* means that default handling should be used. *)
 (* means that default handling should be used. *)
   TCtrlBreakHandler = function (CtrlBreak: boolean): boolean;
   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 }
 { Numbers for routines that have compiler magic }
 {$I innr.inc}
 {$I innr.inc}
 
 

+ 1 - 11
rtl/objpas/sysutils/sysutilh.inc

@@ -81,17 +81,7 @@ type
         2 : (Bytes : Array[0..7] of Byte);
         2 : (Bytes : Array[0..7] of Byte);
    end;
    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
    OWordRec = packed record
       case integer of
       case integer of

+ 0 - 8
rtl/x86_64/cpu.pp

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