From: Michael Collison Date: Sun, 2 Nov 2014 18:00:59 +0000 (+0000) Subject: [ARM] Fix CLZ_DEFINED_VALUE_AT_ZERO for vector modes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b227e35bd56fee1602f692216fbf166f5d6f24e;p=gcc.git [ARM] Fix CLZ_DEFINED_VALUE_AT_ZERO for vector modes 2014-11-02 Michael Collison * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update to support vector modes. (CTZ_DEFINED_VALUE_AT_ZERO): Ditto. From-SVN: r217014 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 68c15afb19a..9cbebf0bccf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-11-02 Michael Collison + + * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update + to support vector modes. + (CTZ_DEFINED_VALUE_AT_ZERO): Ditto. + 2014-11-01 Andrew MacLeod * optabs.h: Flatten insn-codes.h to source files. Move some prototypes diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index cea71b67648..17503df8279 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2142,9 +2142,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)) #define CC_STATUS_INIT \ do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)