From: Michael Collison <michael.collison@linaro.org>
To: gcc-patches@gcc.gnu.org
Subject: [ARM] Fix CLZ_DEFINED_VALUE_AT_ZERO for vector modes
Date: Thu, 09 Oct 2014 07:05:00 -0000 [thread overview]
Message-ID: <543633BD.9030004@linaro.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
The CLZ_DEFINED_VALUE_AT_ZERO macro is harded to return 32. For the
vector intrinsic vclz this is incorrect and should return the value
eight. The CTZ_DEFINED_VALUE_AT_ZERO has the same issue.
Tested on arm-linux-gnueabihf, arm-linux-gnueabi.
2014-10-08 Michael Collison <michael.collison@linaro.com>
* config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
to support vector modes
(CTZ_DEFINED_VALUE_AT_ZERO): Ditto
--
Michael Collison
Linaro Toolchain Working Group
michael.collison@linaro.org
[-- Attachment #2: arm.h.patch --]
[-- Type: text/x-patch, Size: 683 bytes --]
--- ../../../../linaro-gcc4_9_git/gcc/config/arm/arm.h 2014-10-08 13:49:01.109819957 -0700
+++ arm.h 2014-10-08 13:56:19.509841175 -0700
@@ -2138,8 +2138,10 @@ extern int making_const_table;
: 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)
next reply other threads:[~2014-10-09 7:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 7:05 Michael Collison [this message]
2014-10-09 7:11 ` Andrew Pinski
2014-10-09 7:26 ` Michael Collison
2014-10-09 7:55 ` Tejas Belagod
2014-10-09 7:56 ` Michael Collison
2014-10-22 21:53 ` Michael Collison
2014-10-31 18:44 ` Ramana Radhakrishnan
2014-11-12 3:51 ` Yangfei (Felix)
2014-11-12 12:43 ` Christophe Lyon
2014-11-12 13:11 ` Christophe Lyon
2014-11-12 13:48 ` Ramana Radhakrishnan
2014-11-13 13:54 ` Christophe Lyon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=543633BD.9030004@linaro.org \
--to=michael.collison@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).