help for md

brahmaiah vallabhaneni vbrahmaiah@yahoo.com
Wed Sep 13 04:05:00 GMT 2000


 
 

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Hi all, 
Currently I am going through the documents of "Porting Gcc".  
But I have got one small basic doubt, in understanding the md file i.e.,
how should I choose between define_expand and define_insn. 

Please, see the following two defs .These are from Sparc port. I do n't understand why they
chose define_expand for cmpsi. Please explain me this part.

Thanks and regards

V.Brahmaiah
 






(define_expand "cmpsi"
  [(set (reg:CC 100)
        (compare:CC (match_operand:SI 0 "register_operand" "")
                    (match_operand:SI 1 "arith_operand" "")))]
  ""
  "
{
  sparc_compare_op0 = operands[0];
  sparc_compare_op1 = operands[1];
  DONE;
}")



(define_insn "*cmpsi_insn"
  [(set (reg:CC 100)
        (compare:CC (match_operand:SI 0 "register_operand" "r")
                    (match_operand:SI 1 "arith_operand" "rI")))]
  ""
  "cmp\\t%0, %1"
  [(set_attr "type" "compare")])



More information about the Gcc-help mailing list