]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: arm.h (CLZ_DEFINED_VALUE_AT_ZERO): Update to support vector modes.
authorChristophe Lyon <christophe.lyon@linaro.org>
Thu, 13 Nov 2014 13:44:44 +0000 (13:44 +0000)
committerChristophe Lyon <clyon@gcc.gnu.org>
Thu, 13 Nov 2014 13:44:44 +0000 (14:44 +0100)
2014-11-13  Christophe Lyon  <christophe.lyon@linaro.org>

Backport from mainline
2014-11-02  Michael Collison  <michael.collison@linaro.org>

* config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
to support vector modes.
(CTZ_DEFINED_VALUE_AT_ZERO): Ditto.

From-SVN: r217490

gcc/ChangeLog
gcc/config/arm/arm.h

index df44a106e314d975c12b999baaddbaed7d0af54b..e1362eb4d6d2981253529a2f59966a0c31aee4e9 100644 (file)
@@ -1,3 +1,12 @@
+2014-11-13  Christophe Lyon  <christophe.lyon@linaro.org>
+
+       Backport from mainline
+       2014-11-02  Michael Collison  <michael.collison@linaro.org>
+
+       * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
+       to support vector modes.
+       (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
+
 2014-11-13  Eric Botcazou  <ebotcazou@adacore.com>
 
        * doc/tm.texi.in (SELECT_CC_MODE): Update example.
index 63fa3c151352385ae4e97bbff1498364918709e3..b4947cd51d7bdf01c146bfc5780fd75dea2bb2a0 100644 (file)
@@ -2082,9 +2082,10 @@ extern int making_const_table;
    ? reverse_condition_maybe_unordered (code) \
    : reverse_condition (code))
 
-/* The arm5 clz instruction returns 32.  */
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1)
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
+  ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
 \f
 #define CC_STATUS_INIT \
   do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)