Browse Source

Use FPC_USE_INTRINSICS macro to use compiler pause/yield intrinsics function

Pierre Muller 1 day ago
parent
commit
0b8b93e1ce
1 changed files with 1 additions and 4 deletions
  1. 1 4
      rtl/objpas/classes/classes.inc

+ 1 - 4
rtl/objpas/classes/classes.inc

@@ -909,7 +909,7 @@ begin
     as volatile, so the access won't be optimized away by the compiler. (KB) }
   for i:=1 to aIterations do
     begin
-    {$if (FPC_FULLVERSION<30300) or defined(CPULLVM)}
+    {$ifndef FPC_USE_INTRINSICS}
     Inc(SpinWaitDummy); // SpinWaitDummy *MUST* be global
     {$else}
     {$IF defined(CPUX86_64) or Defined(CPUI386)}
@@ -922,9 +922,6 @@ begin
     fpc_ppc_yield;
     {$ELSEIF defined(RISCV) and defined(CPURV_HAS_ZIHINTPAUSE)}
     fpc_riscv_pause;
-    {$ELSE}
-    Inc(SpinWaitDummy); // SpinWaitDummy *MUST* be global
-    {$ENDIF}
     {$ifend}
     end;
 end;