This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: strict_low_part question
- From: Richard Henderson <rth at redhat dot com>
- To: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 5 May 2003 11:17:28 -0700
- Subject: Re: strict_low_part question
- References: <87bryhba3p.fsf@student.uni-tuebingen.de>
On Mon, May 05, 2003 at 07:02:18PM +0200, Falk Hueffner wrote:
> I'm playing with a byteswap builtin, and I would like to expand
> bswap:SI in optabs.c to 3 rotations (rotate low 16 bits by 8, rotate
> 32 bits by 16, rotate low 16 bits by 8; that should give optimal code
> on m68k and i386). However, the rotations of the low bits need to
> leave the high bits unchanged, and I can't seem to be able to emit RTL
> that does this. Can I use strict_low_part somehow? Or do I need iors
> etc? Any hints appreciated...
Yes,
(set (strict_low_part (subreg:HI (reg:SI x) 0))
(rot:HI (subreg:HI (reg:SI x) 0)
(const_int 16)))
should describe exactly what you want.
Though I do suggest that you not expose this before reload.
r~