Two bugfixes in expr.c
Hans-Peter Nilsson
hans-peter.nilsson@axis.com
Thu Apr 27 12:47:00 GMT 2000
> (2) If we have a multi-word move during reload, see if we have
> replacements within the addresses.
>
> Fri Apr 14 18:07:30 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
>
> * expr.c (reload.h): Now included.
> (emit_block_move): Set volatile_ok when checking for movstr.
> (emit_move_1): Check for replacements in addresses in multi-word case.
> * Makefile.in (expr.o): Now includes reload.h.
I'm a bit curious about the multi-word reload bit.
What was the initial cause of the change; did you just spot the
bug by reading source, or did it show up for a particular
test-case, port and language?
Please comment:
I submitted a patch similar in function, but needlessly
complicated (partly because it worked from inside the subwords
loop), in
<URL: http://gcc.gnu.org/ml/gcc-patches/2000-04/msg00067.html >.
I was convinced by Bernd Schmidt in
<URL: http://gcc.gnu.org/ml/gcc-patches/2000-04/msg00099.html >
and
<URL: http://gcc.gnu.org/ml/gcc-patches/2000-04/msg00104.html >
that my patch, and generally taking the approach to allow
splitting up multi-word reloads, was incorrect.
A port must handle this by defining a suitable movdi pattern
when there are patterns allowing DImode operands that might need
to be reloaded, I was informed. In fact, the manual was changed
to (I hope) better express this, see
<URL: http://gcc.gnu.org/ml/gcc-patches/2000-04/msg00105.html >.
In the light of that discussion, it seems there should instead
be a
if (reload_in_progress)
abort ();
rather than a multi-word fixup, in emit_move_insn_1.
I am confused; it seems to me that yours and Bernd's views
about multi-word reloads disagree. What is right?
I was just about to add movdi to the CRIS port when I saw your
patches two weeks ago. The CRIS port has DImode patterns, but
relies on movdi being synthesized, which works well for large
programs and the testsuite with either patch.
PS. You didn't have to include and depend on reload.h to make
find_replacement visible to expr.c; it seems rtl.h is generally
(ab?)used to put such rtl-related extern declarations.
brgds, H-P
More information about the Gcc-patches
mailing list