This is the mail archive of the gcc@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: failuer to build uberbaum --target=m68k-elf


Is this PR8343?

Jim Wilson wrote:
> 
> In
>         http://gcc.gnu.org/ml/gcc/2003-01/msg01606.html
> you mention that combine creates
> (and:SF (mem/f:SF (plus:SI (reg/f:SI 14 %a6)
>              (const_int 8 [0x8])) [2 x+0 S4 A16])
>      (const_int 2147483647 [0x7fffffff]))
> 
> The bug here is that we never should have created this rtl because
> AND:SF is not meaningful.  This rtl is created in simplify_comparison
> where it tries to permute AND and SUBREG.  So I believe the correct fix
> is to add a check for an integral mode there, as otherwise this
> optimization is not correct.
> 
> I am able to build an uberbaum m68k-elf tree with the following patch,
> except for gdb's lib rda, but that isn't a compiler problem. I will do
> x86 bootstraps tomorrow to verify and then check it into the 3.3 branch
> and the trunk.
> 
>   ------------------------------------------------------------------------
> 2003-02-26  James E Wilson  <wilson at tuliptree dot org>
> 
>         * combine.c (simplify_comparison): Require integral mode when
>         permuting SUBREG with AND.
> 
> Index: combine.c
> ===================================================================
> RCS file: /cvs/uberbaum/gcc/combine.c,v
> retrieving revision 1.342
> diff -p -r1.342 combine.c
> *** combine.c   20 Feb 2003 20:56:51 -0000      1.342
> --- combine.c   26 Feb 2003 05:58:53 -0000
> *************** simplify_comparison (code, pop0, pop1)
> *** 11135,11140 ****
> --- 11135,11143 ----
>              represents the low part, permute the SUBREG and the AND and
>              try again.  */
>           if (GET_CODE (XEXP (op0, 0)) == SUBREG
> +             /* Require an integral mode, to avoid creating something like
> +                (AND:SF ...).  */
> +             && SCALAR_INT_MODE_P (GET_MODE (SUBREG_REG (XEXP (op0, 0))))
>               /* It is unsafe to commute the AND into the SUBREG if the SUBREG
>                  is paradoxical and WORD_REGISTER_OPERATIONS is not defined.
>                  As originally written the upper bits have a defined value

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp dot com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985


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