|
@@ -2776,12 +2776,6 @@ begin
|
|
|
def_system_macro('FPC_HAS_INTERNAL_SAR');
|
|
|
{ $endif}
|
|
|
|
|
|
-{ inline bsf/bsr implementation }
|
|
|
-{$if defined(x86) or defined(x86_64)}
|
|
|
- def_system_macro('FPC_HAS_INTERNAL_BSF');
|
|
|
- def_system_macro('FPC_HAS_INTERNAL_BSR');
|
|
|
-{$endif}
|
|
|
-
|
|
|
{$ifdef powerpc64}
|
|
|
def_system_macro('FPC_HAS_LWSYNC');
|
|
|
{$endif}
|
|
@@ -3265,6 +3259,20 @@ if (target_info.abi = abi_eabihf) then
|
|
|
def_system_macro('FPC_DOUBLE_HILO_SWAPPED');
|
|
|
{$endif ARM}
|
|
|
|
|
|
+{ inline bsf/bsr implementation }
|
|
|
+{$if defined(x86) or defined(x86_64)}
|
|
|
+ def_system_macro('FPC_HAS_INTERNAL_BSF');
|
|
|
+ def_system_macro('FPC_HAS_INTERNAL_BSR');
|
|
|
+{$endif}
|
|
|
+{$if defined(arm)}
|
|
|
+ { it is determined during system unit compilation if clz is used for bsf or not,
|
|
|
+ this is not perfect but the current implementation bsf/bsr does not allow another
|
|
|
+ solution }
|
|
|
+ if CPUARM_HAS_CLZ in cpu_capabilities[init_settings.cputype] then
|
|
|
+ def_system_macro('FPC_HAS_INTERNAL_BSR');
|
|
|
+{$endif}
|
|
|
+
|
|
|
+
|
|
|
{ Section smartlinking conflicts with import sections on Windows }
|
|
|
if GenerateImportSection and
|
|
|
(target_info.system in [system_i386_win32,system_x86_64_win64]) then
|