From: Mika Lindqvist Date: Sun, 30 Oct 2016 12:36:09 +0000 (+0200) Subject: Add ARM implementation of CTZL for Visual C++. X-Git-Tag: 1.9.9-b1~660^2~22^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27f42890a1a9af2de387e197cc1af9adc92ab070;p=thirdparty%2Fzlib-ng.git Add ARM implementation of CTZL for Visual C++. --- diff --git a/arch/arm/ctzl.h b/arch/arm/ctzl.h new file mode 100644 index 000000000..f27cb95e2 --- /dev/null +++ b/arch/arm/ctzl.h @@ -0,0 +1,13 @@ +#ifndef ARM_CTZL_H +#define ARM_CTZL_H + +#include + +#if defined(_MSC_VER) && !defined(__clang__) +static __forceinline unsigned long __builtin_ctzl(unsigned long value) +{ + return _arm_clz(_arm_rbit(value)); +} +#endif + +#endif diff --git a/match.c b/match.c index b731246c0..18874dfec 100644 --- a/match.c +++ b/match.c @@ -31,6 +31,8 @@ #if defined(_MSC_VER) && !defined(__clang__) # if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64) # include "arch/x86/ctzl.h" +# elif defined(_M_ARM) +# include "arch/arm/ctzl.h" # endif #endif