This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] teach emit_store_flag to use clz/ctz


On 05/03/2012 03:23 AM, Paolo Bonzini wrote:
- ctzsi4 expands to bitrev + clz:SI, so it will return 32 too. ctz:SI
will never appear at all in the RTX stream, so you can define its value
at zero to be whatever you want.  Hence the correct valid of
CTZ_DEFINED_VALUE_AT_ZERO is also 2.

That's for armv6. For armv5 we don't have bitrev, so we use 31-clz, which yields a value at 0 of -1. Here I think it's best to mirror the rs6000 port in that CLZ_DVAZ == 2, but CTZ_DVAZ == 1.

Similar reasoning applies basically everywhere.

One really needs to examine these closely, one by one.



r~



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]