I am porting gcc to a new target architecture, and have come across a problem when the make process tries to compile libgcc. The error I get is included below.
It seems that gcc has emitted rtl describing a memory reference (mem (plus (mem (plus (reg ..) (const_int ..))) (const_int ..))), which should not have been permitted by GO_IF_LEGITIMATE_ADDRESS since it only allows (mem (plus (reg ..) (const ..))), and forbids a second level of memory reference. I am (obviously) no gcc-expert by far, and have no idea how to tackle this problem. Has anyone had a similar problem, or any pointers as to how I can solve it? The error message is: /cygdrive/c/home/risc/src/gcc-4.1.2/gcc/libgcc2.c: In function '__powidf2': /cygdrive/c/home/risc/src/gcc-4.1.2/gcc/libgcc2.c:1559: error: insn does not satisfy its constraints: (insn 114 153 117 /cygdrive/c/home/risc/src/gcc-4.1.2/gcc/libgcc2.c:1558 (set (mem/c/i:SI (plus:SI (mem/f/c:SI (plus:SI (reg/f:SI 29 r29) (const_int -52 [0xffffffcc])) [0 D.2153+0 S4 A8]) (const_int 4 [0x4])) [0 <result>+4 S4 A8]) (reg:SI 1 r1)) 3 {*movsi_internal} (nil) (nil)) /cygdrive/c/home/risc/src/gcc-4.1.2/gcc/libgcc2.c:1559: internal compiler error: in final_scan_insn, at final.c:2410 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. make[3]: *** [libgcc/./_powidf2.o] Error 1 make[3]: Leaving directory `/cygdrive/c/home/risc/build/gcc/gcc'