On Wed, Aug 1, 2012 at 7:53 AM, Tim Rye <timjrye@xxxxxxxxx> wrote: > > static bool mytarget_legitimate_address_p(enum machine_mode mode, rtx > x, bool strict) { > > while (GET_CODE(x) == MEM) > x = XEXP(x,0); That definitely does not look right. Accepting a MEM here means that your instructions accept addresses stored in memory. That is a very unusual addressing mode. > mul.c:37:1: internal compiler error: in change_address_1, at emit-rtl.c:1996 > > The stack trace at this point looks like this: > > ------------- > > (gdb) where > #0 fancy_abort (file=0xb2c8c8 > "../../gcc-4.7.1-mytarget/gcc/emit-rtl.c", line=1996, > function=0xb2ca20 "change_address_1") at > ../../gcc-4.7.1-mytarget/gcc/diagnostic.c:898 > #1 0x00000000005c4109 in change_address_1 (memref=0x2a95691a08, > mode=HImode, addr=0x2a956919f0, > #5 0x00000000005e80c5 in emit_move_insn_1 (x=0x2a9568c420, y=0x2a95691960) > at ../../gcc-4.7.1-mytarget/gcc/expr.c:3417 This suggests that your move insn needs special handling during reload. That is fairly common, as reload invokes the move insn itself. Read the description of movm closely in http://gcc.gnu.org/onlinedocs/gccint/Standard-Names.html#Standard-Names . Look at examples for similar processors. Ian