Re: unspec in machine description file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/09/14 02:31, Cherry Vanc wrote:
> I cannot seem to pin down the scope of the keyword "unspec" in the
> machine description files. From the MIPS backend files, I see the word
> "unspec" being used in two ways :
> 
> 1. names of constants (UNSPEC_LOAD_LOW, UNSPEC_LOAD_HIGH, .. so on) :
> I understand that these are just names, but Why UNSPEC_ preceding each
> name ?
> 2. some define_insn patterns have the "unspec" rtl expression. What
> does "unspec" precisely mean here - unspecified operation ? How does
> that work in the RTL generation pass ? E.g. :
> 
> (define_insn "<u>mulsidi3_64bit_hilo"
>   [(set (match_operand:TI 0 "register_operand" "=x")
>   (unspec:TI
>     [(mult:DI
>        (any_extend:DI (match_operand:SI 1 "register_operand" "d"))
>        (any_extend:DI (match_operand:SI 2 "register_operand" "d")))]
>     UNSPEC_SET_HILO))]
>   "TARGET_64BIT && !TARGET_FIX_R4000"
>   "mult<u>\t%1,%2"
>   [(set_attr "type" "imul")
>    (set_attr "mode" "SI")])

Look at

(define_expand "<u>mulsidi3_64bit_split"
  [(set (match_operand:DI 0 "register_operand")
	(mult:DI (any_extend:DI (match_operand:SI 1 "register_operand"))
		 (any_extend:DI (match_operand:SI 2 "register_operand"))))
   (clobber (match_operand:DI 3 "register_operand"))]
  ""
{
  rtx hilo;

  hilo = gen_rtx_REG (TImode, MD_REG_FIRST);
  emit_insn (gen_<u>mulsidi3_64bit_hilo (hilo, operands[1], operands[2]));

  ...

Andrew.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux