This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A question about define_insn and force-reg

Hello, gcc

I think it's very interesting. I want to split a insn of loading SF
data through SI symbol, such as (set (reg:SF 5 $5) (mem/u/f:SF
(symbol_ref/u:SI ("*$LC0")))).
I want to it firstly load the address into a register, then load the
data through
the register. So I define the insn as follows,
  (define_insn "loadsf"
  [(set (match_operand:SF 0 "register_operand" "=r")
        (mem:SF (match_operand:SI 1 "immediate_operand" "m")))]
    operands[1] = force_reg (SImode, operands[1]);
    return md_output_move (operands[0], operands[1]);
  [(set_attr "type"	"load")
   (set_attr "mode"	"SF")
   (set_attr "length"	"*")])

  But the gcc will come out such error,
  internal compiler error: in gen_reg_rtx,  at emit-rtl.c:819.

  Which is the codes as following at emit-rtl.c:819,
   /* Don't let anything called after initial flow analysis create new
     registers.  */
  if (no_new_pseudos)
    abort ();

  Why can't I create a new register? So how should I do to implement it?

  Thanks for your help time after time.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]