Add AVG and UAVG rtx codes

Jakub Jelinek jakub@redhat.com
Thu Jun 16 16:30:00 GMT 2011


On Thu, Jun 16, 2011 at 06:08:17PM +0200, Bernd Schmidt wrote:
> Another operation that exists on a number of processors is an "average"
> operation, which computes "(ext (A) + ext (B) + 1) >> 1" from two input
> operands. Some of our backends try to represnt this with complex RTL
> expressions, others use unspec. This patch adds two new rtx codes.
> 
> Bootstrapped and tested on i686-linux (with the usual pass39-frag test
> failures). Ok?

Please add the new codes also to dwarf2out.c (mem_loc_descriptor), otherwise
if it will be optimized away you might get ICEs when emitting debug info.
Similarly for CRSB or whatever for the sign bit count.
If you don't feel like adding support for emitting it in DWARF
(CRSB might be similar to CLZ and might even use the same routine with
some tweaks, AVG/UAVG should be easy too), just add it to the
list of unhandled cases.

	Jakub



More information about the Gcc-patches mailing list