瀏覽代碼

* clz is only available on thumb2/arm

git-svn-id: trunk@25416 -
florian 12 年之前
父節點
當前提交
6f11e3f316
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/options.pas

+ 3 - 1
compiler/options.pas

@@ -3424,7 +3424,9 @@ if (target_info.abi = abi_eabihf) then
   { it is determined during system unit compilation if clz is used for bsf or not,
   { 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
     this is not perfect but the current implementation bsf/bsr does not allow another
     solution }
     solution }
-  if CPUARM_HAS_CLZ in cpu_capabilities[init_settings.cputype] then
+  if (CPUARM_HAS_CLZ in cpu_capabilities[init_settings.cputype]) and
+     ((init_settings.instructionset=is_arm) or
+      (CPUARM_HAS_THUMB2 in cpu_capabilities[init_settings.cputype])) then
     begin
     begin
       def_system_macro('FPC_HAS_INTERNAL_BSR');
       def_system_macro('FPC_HAS_INTERNAL_BSR');
       if CPUARM_HAS_RBIT in cpu_capabilities[init_settings.cputype] then
       if CPUARM_HAS_RBIT in cpu_capabilities[init_settings.cputype] then