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]

Re: how to add new instruction

ok. the new rtl definition is like:

DEF_RTL_EXPR(NEWINSN, "newinsn", "ei", 'x'), i use "ei" here, because
the first operand is real type, and the second one is int type.

in, i added a defin_insn section just like:

(define_insn "newinsnsf"
  [(set (match_operand:SF 0 "general_operand" "")
	(newinsn:SF (match_operand:SF 1 "general_operand" "")
		(match_operand:SI 2 "const_int_operand" "")))
   (clobber (reg:CC 17))]
  "newinsn\\t{%2, %0|%0, %2}"
  [(set_attr "type" "other")
   (set_attr "mode" "SF")])

it turns out an error saying "missing name or number" before line
--(match_operand:SI 2 "const_int_operand" ""))). it seems newinsn is
not recognized.

however, when i changed the "ei" in rtl definition to "ee", it works
well. i don't know why? what's the problem with "ei"?

On Fri, 14 Jan 2005 17:56:14 -0800, James E Wilson
<> wrote:
> apollo wrote:
> > i'm afraid so. i add a new rtl expression in rtl.def. and when i add a
> > new define_insn
> >  section in, it said the instruction is undefined.
> You need to be much more explicit about what happened here if you want
> help.  You need to give the exact error you got, the exact command that
> was used to produce it, the exact change you made to the file, etc.
> --
> Jim Wilson, GNU Tools Support,

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