arm: correctly define __ARM_FEATURE_CLZ
commitaa510619f8b650322c113d8593dd57afe6c6f9ae
authorRichard Earnshaw <rearnsha@arm.com>
Mon, 19 Dec 2022 15:01:49 +0000 (19 15:01 +0000)
committerRichard Earnshaw <rearnsha@arm.com>
Mon, 19 Dec 2022 15:03:30 +0000 (19 15:03 +0000)
tree63b13e035694e04129049c8d4491ebeca6fee2ed
parent8577356f4b8a2c9a397390339006eca8f6efa14d
arm: correctly define __ARM_FEATURE_CLZ

The ACLE requires that __ARM_FEATURE_CLZ be defined if the hardware
supports it; it's also clear that this doesn't mean the current ISA,
so we must define this even when compiling for Thumb1 if the target
supports CLZ in A32.

This brings GCC into alignment with Clang.

gcc/ChangeLog:

* config/arm/arm-c.cc (__ARM_FEATURE_CLZ): Fix definition of
preprocessor macro when target has CLZ in another ISA.
gcc/config/arm/arm-c.cc