roy rosen <roy.1ro...@gmail.com> writes: > I have already have both and it still does that. > It seems that after we get here, nothing would stop gcc from emiting > such an invalid insn (tem = emit_insn (gen_move_insn (out, in));). So > I think that maybe the problem is that I got there with these in and > out arguments.
That's correct. You need to figure out how to make that not happen. (That was the actually the goal of my suggestion, although I didn't say it, and I guess it was not helpful in any case.) Ian > 2010/6/23, Ian Lance Taylor <i...@google.com>: >> roy rosen <roy.1ro...@gmail.com> writes: >> >> > In my port I get to gen_reload to the lines >> > >> > /* If IN is a simple operand, use gen_move_insn. */ >> > else if (OBJECT_P (in) || GET_CODE (in) == SUBREG) >> > { >> > static int xxx; >> > xxx = OBJECT_P (in); >> > tem = emit_insn (gen_move_insn (out, in)); >> > /* IN may contain a LABEL_REF, if so add a REG_LABEL_OPERAND note. >> > */ >> > mark_jump_label (in, tem, 0); >> > } >> > >> > the emit_insn which should emit a move insn gets as out a register >> > from class D and as in the Stack pointer. >> > In my port there is no insn which can write directly from sp to d. so >> > the emitted insn is invalid and the compilation terminates. >> > >> > What might be the problem? >> > Is it possible to arrive to this point with such arguments and later >> > to fix it or does the problem begin earlier somewhere. >> >> This tends to mean that you haven't set REGISTER_MOVE_COST correctly. >> You need to make sure that moves between register class D and the >> stack pointer have a cost greater than 2. If you are unlucky you may >> have to introduce a secondary reload. >> >> Ian >>