This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: invalid insn generated
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.
2010/6/23, Ian Lance Taylor <iant@google.com>:
> roy rosen <roy.1rosen@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
>