From 6f11e3f3163b2a4f8cb4aa143e56f4c0d96ba918 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 4 Sep 2013 21:00:01 +0000 Subject: [PATCH] * clz is only available on thumb2/arm git-svn-id: trunk@25416 - --- compiler/options.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/options.pas b/compiler/options.pas index 38ad08d049..ec6c2e0b55 100644 --- a/compiler/options.pas +++ b/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, 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 + 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 def_system_macro('FPC_HAS_INTERNAL_BSR'); if CPUARM_HAS_RBIT in cpu_capabilities[init_settings.cputype] then