Combine known_cond() may create subreg of const_int

Alexandre Oliva aoliva@redhat.com
Wed Feb 20 13:59:00 GMT 2002


On Feb 15, 2002, Richard Henderson <rth@redhat.com> wrote:

>> Not yet.  I'll make the simplification you've suggested and start
>> trying alpha and sparc bootstraps, as well as some crosses (ppc,
>> mn10300, sh and sh64, most likely).

> Thanks.

Ok, so I needed an additional change for this to work on alpha.  The
problem was that we were zero_extending a CONST_INT to TImode, but
simplify_unary_operation() had what seemed to be a typo that caused it
to reject modes wider than 2*HOST_BITS_PER_INT, instead of
2*HOST_BITS_PER_WIDE_INT, which is the maximum width of a
CONST_DOUBLE.  So I went ahead and made this change, and then all of
the natives and crosses above build successfully, except sparc, that
required further changes.  The sparc port had numerous occurrences of
code that either assumed HOST_WIDE_INT to be 32-bits wide or assumed
that it was ok for CONST_INTs to not be valid sign-extensions for the
modes.  I put in some trunc_int_for_mode() here and there and got
sparc-unknown-linux-gnu and sparc-sun-solaris2.7 to bootstrap, and
built sparc-elf and sparc64-elf successfully (after fixing a minor bug
in libgloss).  Bootstrap hasn't completed on sparcv9-sun-solaris2.7
because I ran short on disk space on the nearest Solaris7 box, but I
could give it another push if you think it's worth it.  Anyway, here
are the patches.  Tested on all of the above, and also bootstrapped on
athlon-pc-linux-gnu.  Ok to install?

(Oh, I realize the patch for sparc also removes the inclusion of
sys/mman.h.  This is important because sol2.h, for some reason, is not
used only on Solaris, but also on sparc-elf and probably other sparc
targets that don't have this header.  I've verified that everything
builds just fine without the include, except for warnings when
compiling TRANSFER_FROM_TRAMPOLINE.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: zero-extend-sanity-check.patch
Type: text/x-patch
Size: 5288 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020220/87ec31bb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc-trunc-int.patch
Type: text/x-patch
Size: 8724 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020220/87ec31bb/attachment-0001.bin>
-------------- next part --------------


-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


More information about the Gcc-patches mailing list