[ARM]Make CLZ_DEFINED_VALUE_AT_ZERO and CTZ_DEFINED_VALUE_AT_ZERO return 2.

Renlin Li renlin.li@arm.com
Tue Jan 13 16:11:00 GMT 2015


Hi all,

This patch update CLZ_DEFINED_VALUE_AT_ZERO and 
CTZ_DEFINED_VALUE_AT_ZERO to make them return 2 in
arm back-end.

Here are the explanations from GCC documentation:

CLZ_DEFINED_VALUE_AT_ZERO (mode, value)
CTZ_DEFINED_VALUE_AT_ZERO (mode, value)
A C expression that indicates whether the architecture defines a value
for @code{clz} or @code{ctz} with a zero operand.
A result of 0 indicates the value is undefined.
If the value is defined for only the RTL expression, the macro should
evaluate to 1; if the value applies also to the corresponding optab
entry (which is normally the case if it expands directly into
the corresponding RTL), then the macro should evaluate to 2.
In the cases where the value is defined, @var{value} should be set to
this value.

arm-none-eabi has been test on the model, no new issue.
Okay for trunk?

gcc/ChangeLog:

     2015-01-13 Renlin Li <renlin.li@arm.com>

     * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO): Return 2.
     (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm.diff
Type: text/x-patch
Size: 600 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150113/47a6e552/attachment.bin>


More information about the Gcc-patches mailing list