unspec in machine description file

Cherry Vanc cherry.vanc@gmail.com
Wed Sep 3 01:31:00 GMT 2014


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")])

Thanks in advance!



More information about the Gcc-help mailing list