This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

Re: VOIDmode in ZERO_EXTEND crashed


Quoting daniel tian <daniel.xntian@gmail.com>:

hi, everyone:
     I have ported the gcc to new RISC chip. But when I build the
newlib with it, the gcc crashed in simplify-rtx.c.
     error message is like this:

     ../../../../../newlib-1.16.0/newlib/libc/time/tzset_r.c: In
function _tzset_r?
     ../../../../../newlib-1.16.0/newlib/libc/time/tzset_r.c:195:
internal compiler error: in simplify_const_unary_operation, at
simplify-rtx.c:1108

And the code there is simplify-rtx.c 1108:

     case ZERO_EXTEND:
	  /* When zero-extending a CONST_INT, we need to know its
             original mode.  */
	  gcc_assert (op_mode != VOIDmode);

     I tracked the gcc, It caused by the RTX   (const_int 60). As I
know the CONST_INT is alway being VOIDmode.

That exactly is the problem. You can't have a CONST_INT inside a ZERO_EXTEND. That is not valid. You'll need a separate pattern to recognize the CONST_INT without a ZERO_EXTEND around it. Unfortunately, this will not give reload the freedom it should have.


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