This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem updating 2yr old port


Hello,

I'm trying to make a port to a new architecture work on the current gcc. There hasn't been any work
done on this port since Nov-2008.

The compiler builds now, but I'm getting an ICE when I try to compile a program.

---------
X:
--
(mem/f/c/i:PSI (plus:PSI (reg/f:PSI 87 virtual-stack-vars)
        (const_int -12 [0xfffffff4])) [0 str+0 S4 A32])
Y:
--
(const_int 0 [0])
--

In file included from /cool/tmp/argz_add.c:7:0:
/cool/merge/cool-gcc/src/newlib/libc/include/argz.h: In function 'argz_add':
/cool/merge/cool-gcc/src/newlib/libc/include/argz.h:23:9: internal compiler error: in prepare_cmp_insn, at optabs.c:4159
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
----------

These "X" and "Y" messages are debug messages which I've added with print_inline_rtx().

The offending line in the source file is

  if (str == NULL)
    return 0;

str is a "const char *". Pointers are using PSI mode on this architecture, since they are only 20 bits wide.

The inputs x and y to prepare_cmp_insn are in PSImode and VOIDmode, and it seems
the compiler cannot compare these modes anymore.

The old version of prepare_cmp_insn() called can_compare_p() at this point which returned success and all was well.
Now can_compare_p() is only called for MODE_CC modes.

Looking at the history of optabs.c, the MODE_CC test was introduced when merging the cond-optab branch
to main. I didn't find a description of the cond-optab branch and what it was supposed to do.

Can anybody give me some hints how to continue from here? I'm rather new to gcc hacking and don't have
yet the big picture of a gcc backend. Not even the details. :-)

regards,
chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]