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

Reply via email to