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] S/390: shifts and setmems with implicit ANDs


On Fri, Aug 12, 2005 at 12:30:12PM +0200, Andreas Krebbel wrote:
> shift instructions on s390 only use the 6 least significant bits
> of the shift count operand. Hence we can skip pointless ANDs. After
> an unsuccessful try using TARGET_SHIFT_TRUNCATION_MASK I've modified
> the shift_count_operand predicate and the print_shift_count_operand
> function to omit ANDs with constants which have set these 6 bits.

Um, I think you'll find you have reload problems here.  We've tried
this before on mips and x86 to deal with sign-extend and float-extend
operators respectively.

IMO the only thing to do is to move TARGET_SHIFT_TRUNCATION_MASK usage
into the combiner, etc, and replace use of SHIFT_COUNT_TRUNCATED.

> Almost the same applies to the padding byte operand of mvcle which is
> always truncated to the 8 least significant bits.

Here you'd just have to use multiple patterns, iiuc.



r~


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