This is the mail archive of the
mailing list for the GCC project.
Re: [patch] h8300.md: Enable divxu.b on H8/300
- From: Jeff Law <law at porcupine dot slc dot redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 09 Sep 2002 10:25:52 -0600
- Subject: Re: [patch] h8300.md: Enable divxu.b on H8/300
- Reply-to: law at redhat dot com
In message <email@example.com>, Kazu Hirata writes:
>Attached is a patch to enable divxu.b on H8/300.
>It seems disabled for no reason.
Probably an oversight. Possibly due to the limited usefullness of
Looking at the udivmodXXX expanders, I have some concerns about how they
modify operand1, which is supposed to be a source operand. It seems to
me that can't be correct:
[(set (match_operand:HI 1 "register_operand" "")
(and:HI (match_dup 1)
(parallel [(set (match_operand:QI 0 "register_operand" "")
(match_operand:QI 2 "register_operand" "")))))
(set (match_operand:QI 3 "register_operand" "")
(zero_extend:HI (match_dup 2)))))])]
Note how the first insn generated by this expander will mask off the
upper bits of operand 1, but we have no assurance that operand1 is not
live after this insn. It seems to me that we should have copied operand1
into a new temporary so that we can safely modify it.