embedded target breakage [Was: Re: Patch commit requirements]

Geoff Keating geoffk@geoffk.org
Thu Jun 21 16:58:00 GMT 2001


> From: Toshi Morita <tm2@best.com>
> Date: Thu, 21 Jun 2001 16:35:09 -0700 (PDT)

> http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00798.html

What is the history of the code you're patching?  Did someone add this
to try to fix some other bug?

> http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00624.html

This is OK.

> ...and I know the force_to_mode bug is still in 3.0 because
> I tested 3.0 for this bug last night, and it was indeed still
> present, so I filed a GNATS PR:
> 
> http://gcc.gnu.org/ml/gcc-patches/2001-04/msg01267.html

I still don't think this patch is right.  The docs for this function
say:

/* See if X can be simplified knowing that we will only refer to it in
   MODE and will only refer to those bits that are nonzero in MASK.
   If other bits are being computed or if masking operations are done
   that select a superset of the bits in MASK, they can sometimes be
   ignored.

   Return a possibly simplified expression, but always convert X to
   MODE.  If X is a CONST_INT, AND the CONST_INT with MASK.

There is no mention there that this will apply the MASK to the
parameter _unless_ it is going to return a CONST_INT; your patch seems
to generate an AND rtx always, which is certainly wrong around a
CONST_INT because (and (const_int) (const_int)) is not valid RTL.

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc-patches mailing list