Explorar el Código

Also disable FPC_USE_INTRINSICS on i386 and x86_64 if LLVM or for version < 3.3.1

Pierre Muller hace 15 horas
padre
commit
7a1aa47ec5

+ 4 - 0
rtl/amicommon/classes.pp

@@ -72,9 +72,13 @@ uses
 { Also set FPC_USE_INTRINSICS for i386 and x86_64,
   but only after _USES clause as there
   is not intinsics unit for those CPUs }
+{$IF FPC_FULLVERSION>=30301}
+{$ifndef CPULLVM}
 {$if defined(CPUI386) or defined(CPUX86_64)}
    {$define FPC_USE_INTRINSICS}
 {$endif}
+{$endif}
+{$endif}
 
 {$i classesh.inc}
 

+ 4 - 0
rtl/embedded/classes.pp

@@ -69,9 +69,13 @@ uses
 { Also set FPC_USE_INTRINSICS for i386 and x86_64,
   but only after _USES clause as there
   is not intinsics unit for those CPUs }
+{$IF FPC_FULLVERSION>=30301}
+{$ifndef CPULLVM}
 {$if defined(CPUI386) or defined(CPUX86_64)}
    {$define FPC_USE_INTRINSICS}
 {$endif}
+{$endif}
+{$endif}
 
 {$i classesh.inc}
 

+ 27 - 2
rtl/freertos/classes.pp

@@ -19,6 +19,17 @@
 {$IF FPC_FULLVERSION>=30301}
 {$modeswitch FUNCTIONREFERENCES}
 {$define FPC_HAS_REFERENCE_PROCEDURE}
+{$ifndef CPULLVM}
+{$if DEFINED(CPUARM) or DEFINED(CPUAARCH64)}
+   {$define FPC_USE_INTRINSICS}
+{$endif}
+{$if defined(CPUPOWERPC) or defined(CPUPOWERPC64)}
+   {$define FPC_USE_INTRINSICS}
+{$endif}
+{$if defined(CPURISCV32) or defined(CPURISCV64)}
+   {$define FPC_USE_INTRINSICS}
+{$endif}
+{$endif}
 {$endif}
 
 {$IFNDEF FPC_DOTTEDUNITS}
@@ -35,6 +46,9 @@ uses
   System.SortBase,
 {$ifdef FPC_TESTGENERICS}
   System.FGL,
+{$endif}
+{$ifdef FPC_USE_INTRINSICS}
+  System.Intrinsics,
 {$endif}
   System.TypInfo;
 {$ELSE FPC_DOTTEDUNITS}
@@ -46,12 +60,23 @@ uses
 {$ifdef FPC_TESTGENERICS}
   fgl,
 {$endif}
-{$IF DEFINED(CPUARM) or DEFINED(CPUAARCH64) }
+{$ifdef FPC_USE_INTRINSICS}
   intrinsics,
-{$ENDIF}
+{$endif}
   typinfo;
 {$ENDIF FPC_DOTTEDUNITS}
 
+{ Also set FPC_USE_INTRINSICS for i386 and x86_64,
+  but only after _USES clause as there
+  is not intinsics unit for those CPUs }
+{$IF FPC_FULLVERSION>=30301}
+{$ifndef CPULLVM}
+{$if defined(CPUI386) or defined(CPUX86_64)}
+   {$define FPC_USE_INTRINSICS}
+{$endif}
+{$endif}
+{$endif}
+
 {$i classesh.inc}
 
 

+ 4 - 0
rtl/unix/classes.pp

@@ -72,9 +72,13 @@ uses
 { Also set FPC_USE_INTRINSICS for i386 and x86_64,
   but only after _USES clause as there
   is not intinsics unit for those CPUs }
+{$IF FPC_FULLVERSION>=30301}
+{$ifndef CPULLVM}
 {$if defined(CPUI386) or defined(CPUX86_64)}
    {$define FPC_USE_INTRINSICS}
 {$endif}
+{$endif}
+{$endif}
 
 {$i classesh.inc}
 

+ 4 - 0
rtl/win32/classes.pp

@@ -74,9 +74,13 @@ uses
 { Also set FPC_USE_INTRINSICS for i386 and x86_64,
   but only after _USES clause as there
   is not intinsics unit for those CPUs }
+{$IF FPC_FULLVERSION>=30301}
+{$ifndef CPULLVM}
 {$if defined(CPUI386) or defined(CPUX86_64)}
    {$define FPC_USE_INTRINSICS}
 {$endif}
+{$endif}
+{$endif}
 
 {$i classesh.inc}
 

+ 4 - 0
rtl/win64/classes.pp

@@ -74,9 +74,13 @@ uses
 { Also set FPC_USE_INTRINSICS for i386 and x86_64,
   but only after _USES clause as there
   is not intinsics unit for those CPUs }
+{$IF FPC_FULLVERSION>=30301}
+{$ifndef CPULLVM}
 {$if defined(CPUI386) or defined(CPUX86_64)}
    {$define FPC_USE_INTRINSICS}
 {$endif}
+{$endif}
+{$endif}
 
 type
   TWndMethod = procedure(var msg : TMessage) of object;

+ 27 - 2
rtl/wince/classes.pp

@@ -19,6 +19,17 @@
 {$IF FPC_FULLVERSION>=30301}
 {$modeswitch FUNCTIONREFERENCES}
 {$define FPC_HAS_REFERENCE_PROCEDURE}
+{$ifndef CPULLVM}
+{$if DEFINED(CPUARM) or DEFINED(CPUAARCH64)}
+   {$define FPC_USE_INTRINSICS}
+{$endif}
+{$if defined(CPUPOWERPC) or defined(CPUPOWERPC64)}
+   {$define FPC_USE_INTRINSICS}
+{$endif}
+{$if defined(CPURISCV32) or defined(CPURISCV64)}
+   {$define FPC_USE_INTRINSICS}
+{$endif}
+{$endif}
 {$endif}
 
 
@@ -41,6 +52,9 @@ uses
   System.FGL,
 {$endif}
   System.TypInfo,
+{$ifdef FPC_USE_INTRINSICS}
+  System.Intrinsics,
+{$endif}
   WinApi.Windows;
 {$ELSE FPC_DOTTEDUNITS}
 uses
@@ -52,12 +66,23 @@ uses
   fgl,
 {$endif}
   typinfo,
-{$IF DEFINED(CPUARM) or DEFINED(CPUAARCH64) }
+{$ifdef FPC_USE_INTRINSICS}
   intrinsics,
-{$ENDIF}
+{$endif}
   windows;
 {$ENDIF FPC_DOTTEDUNITS}
 
+{ Also set FPC_USE_INTRINSICS for i386 and x86_64,
+  but only after _USES clause as there
+  is not intinsics unit for those CPUs }
+{$IF FPC_FULLVERSION>=30301}
+{$ifndef CPULLVM}
+{$if defined(CPUI386) or defined(CPUX86_64)}
+   {$define FPC_USE_INTRINSICS}
+{$endif}
+{$endif}
+{$endif}
+
 type
   TWndMethod = procedure(var msg : TMessage) of object;