[PATCH] D27530: [builtin] for the condition for check __ARM_FEATURE_CLZ

Weiming Zhao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 10:24:13 PST 2016


weimingz created this revision.
weimingz added reviewers: rnk, compnerd.
weimingz added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.

Since CLZ is not available for Thumb1, we use __ARM_ARCH_ISA_THUMB != 1 as one of the conditions.


https://reviews.llvm.org/D27530

Files:
  lib/builtins/assembly.h


Index: lib/builtins/assembly.h
===================================================================
--- lib/builtins/assembly.h
+++ lib/builtins/assembly.h
@@ -71,8 +71,8 @@
 #define ARM_HAS_BX
 #endif
 #if !defined(__ARM_FEATURE_CLZ) &&                                             \
-    ((__ARM_ARCH >= 6 && __ARM_ARCH_PROFILE != 'M') ||                         \
-     (__ARM_ARCH == 5 && !defined(__ARM_ARCH_5__)))
+    __ARM_ARCH_ISA_THUMB != 1 &&                                               \
+    (__ARM_ARCH >= 6  || (__ARM_ARCH == 5 && !defined(__ARM_ARCH_5__)))
 #define __ARM_FEATURE_CLZ
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27530.80626.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161207/e58accfa/attachment.bin>


More information about the llvm-commits mailing list