This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for h8300 port
- To: Kazu Hirata <kazu at hxi dot com>
- Subject: Re: Patch for h8300 port
- From: Richard Henderson <rth at cygnus dot com>
- Date: Fri, 6 Oct 2000 16:21:19 -0700
- Cc: Will Cohen <wcohen at redhat dot com>, gcc-patches at gcc dot gnu dot org
- References: <41ECF07CC183D111A6F800805FEDAB190CE725@EXCHANGE1>
On Fri, Oct 06, 2000 at 07:03:58PM -0400, Kazu Hirata wrote:
> A friend of mine on some mailing list was about to submit a very similar
> patch, where he was trying to change "2,4" to "2,6". What a coincidence!
Oh, I see -- the h8 isn't a fixed-width architecture.
We are misjudging the length of the mov.w instruction.
Looking at the movhi pattern, I see that indeed moves
from memory may be either 2 or 4 bytes on h8300h or
h8300s. So "2,6" would be the correct conservative
estimate, though splitting the input to "0,>,g" would
give the more accurate "2,4,6".
> By the way, as far as the comments I've read somewhere, the 2nd
> alternative, suggested to be deleted by the patch, is for optimization
> purpose, where -O0 generates a horibly long sequence of insns.
A very plausable explanation. It would be still be
interesting to know how removing the memory alternative
affects optimized code, however.
r~