This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: movstrictqi/movstricthi fix for h8300
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: movstrictqi/movstricthi fix for h8300
- From: Bernd Schmidt <bernds at redhat dot co dot uk>
- Date: Tue, 12 Sep 2000 09:45:41 +0100 (BST)
- cc: Matthew Hiller <hiller at cygnus dot com>, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
On Mon, 11 Sep 2000, Jeffrey A Law wrote:
> > 2000-09-11 Matthew Hiller <hiller@redhat.com>
> >
> > * config/h8300/h8300.md (movstrictqi): Changed constraint modifier
> > on operand 0 to '+'.
> > (movstricthi): Likewise.
> Approved and installed.
>
> For extra credit -- submit a testcase for the bug which led you to this
> patch.
For yet more extra credit, also fix convex.md, i370.md, i386.md, ns32k.md,
sh.md and vax.md :-) (See below)
> It also seems to me that this might be something we could have one of the
> gen* programs check for since I believe every STRICT_LOW_PART is a
> read/write operand. genoutput or genrecog would likely be the best
> candidates.
I've been irritated by STRICT_LOW_PART for a while. What do you folks
think about eliminating it?
It's yet another one of the irregularities in rtl which I hate so much.
Every piece of code that analyzes RTL has to special-case it (along
with a few other rtxs, but one thing at a time). It's not easy to
optimize, e.g. for a cse-like pass you can't easily record an equivalence.
And, people forget that they are in-out operands and write "=" in their
machine descriptions rather than "+".
I think it would be cleaner to represent a movstrict pattern as something
like
(set (reg X) (ior (and X 0xFF....00) (zero_extend Y)))
This might even help the combiner, who knows.
Thoughts?
Bernd
gcc/config/convex/convex.md: [(set (strict_low_part (match_operand:SI 0 "general_operand" "=d,r,d,r,r,m"))
gcc/config/h8300/h8300.md: [(set (strict_low_part (match_operand:QI 0 "general_operand_dst" "=r,r,r,r"))
gcc/config/h8300/h8300.md: [(set (strict_low_part (match_operand:HI 0 "general_operand_dst" "=r,r,r,r"))
gcc/config/i370/i370.md: [(set (strict_low_part (match_operand:QI 0 "general_operand" "=d"))
gcc/config/i370/i370.md: [(set (strict_low_part (match_operand:HI 0 "register_operand" "=d"))
gcc/config/i370/i370.md: [(set (strict_low_part (match_operand:HI 0 "general_operand" "=dm"))
gcc/config/i386/i386.md: [(set (strict_low_part (match_operand:HI 0 "register_operand" "=r"))
gcc/config/ns32k/ns32k.md: [(set (strict_low_part (match_operand:HI 0 "register_operand" "=r"))
gcc/config/ns32k/ns32k.md: [(set (strict_low_part (match_operand:QI 0 "register_operand" "=r"))
gcc/config/ns32k/ns32k.md: [(set (strict_low_part (match_operand:HI 0 "register_operand" "=r"))
gcc/config/ns32k/ns32k.md: [(set (strict_low_part (match_operand:QI 0 "register_operand" "=r"))
gcc/config/sh/sh.md: [(set (strict_low_part (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,r,m,r"))
gcc/config/vax/vax.md: [(set (strict_low_part (match_operand:HI 0 "register_operand" "=g"))
gcc/config/vax/vax.md: [(set (strict_low_part (match_operand:QI 0 "register_operand" "=g"))