http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54089

--- Comment #17 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-09-10 
21:27:30 UTC ---
Created attachment 28163
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28163
Alternative dropped software dynamic ashlsi3,lshrsi3 patch

(In reply to comment #16)
> Author: olegendo
> Date: Mon Sep 10 20:35:25 2012
> New Revision: 191161
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191161
> Log:
>     PR target/54089
>     * config/sh/sh.h (SH_DYNAMIC_SHIFT_COST): Set always to 1 if
>     dynamic shifts are available.
>     (SHIFT_COUNT_TRUNCATED): Always define to 0.  Correct comment.
>     * config/sh/sh.c (ashl_lshr_seq, ext_ashl_lshr_seq): Add comments.
>     * config/sh/predicates.md (shift_count_operand): Allow
>     arith_reg_operand even if TARGET_DYNSHIFT is false.
>     * config/sh/sh.md (ashlsi3, lshrsi3): Expand library call patterns
>     if needed.
>     (ashlsi3_d_call, lshrsi3_d_call): New insns.
> 
>     PR target/54089
>     * config/sh/lib1funcs.S (ashlsi3): Reimplement as ashlsi3_r0.
>     (lshrsi3): Reimplement as lshrsi3_r0.
> 
>     PR target/54089
>     * gcc.target/sh/pr54089-3.c: New.
> 
> 
> Added:
>     trunk/gcc/testsuite/gcc.target/sh/pr54089-3.c
> Modified:
>     trunk/gcc/ChangeLog
>     trunk/gcc/config/sh/predicates.md
>     trunk/gcc/config/sh/sh.c
>     trunk/gcc/config/sh/sh.h
>     trunk/gcc/config/sh/sh.md
>     trunk/gcc/testsuite/ChangeLog
>     trunk/libgcc/ChangeLog
>     trunk/libgcc/config/sh/lib1funcs.S

This patch is just for the record/reference.  It is a little bit more complex
than the committed patch.  The main difference is the clobber list and the
input/output regs of the shift insns.  The committed version seemed more
beneficial.

Reply via email to