Query regarding RTL Template in i386.md

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

 



Hello  everyone,

I would like to request your help in a specific matter which
relates to i386.md (GCC-4.0).

I find it difficult  to understand the motivation to use
two or more  'set' constructs in an RTL template.   Here is an example
from i386.md (GCC-4.0) file (only RTL Template is shown):

----------------------------------------------------------------------
(define_insn "*adddi_2_rex64"
  [(set (reg FLAGS_REG)
        (compare
          (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0")
                   (match_operand:DI 2 "x86_64_general_operand" "rme,re"))
          (const_int 0)))
   (set (match_operand:DI 0 "nonimmediate_operand" "=r,rm")
        (plus:DI (match_dup 1) (match_dup 2)))]
----------------------------------------------------------------------

As visible in the template, it contains two 'set' operators. A few
questions that come to mind are:

 - the  use  of  multiple   'set'  constructs:  in  particular,  what
   aspect(s) of the instruction set, or the target machine, guides us
   to choose such a construction,

 - how does  one 'evaluate' the  benefits if other patterns  with one
   'set' are possible, (this particularly pertains to the decision of
   where  to   place  the  insn   pattern  in  the   overall  machine
   description, since GCC uses a 'first hit' approach).

An example C code fragment would be extremely useful, if possible.
I deeply appreciate the time and effort you would be spending in replying. I will be very thankful if you can provide me with your expert guidance and thoughts.

-regards
__________________________________________
Piyush Porwal
CSE - M.Tech.
Indian Institute of Technology, Bombay
India
http://www.cse.iitb.ac.in/~porwalpiyush
__________________________________________


[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