lmjm%doc.imperial.ac.uk@NSFNET-RELAY.AC.UK (07/20/89)
I'm attempting to port Gcc 1.35 to an Intergraph Clipper (the machine is an HLH Orion 1/05). I'm in the process of writing the .md file and am wondering what is the best way to specify the insns. I've only just really started and the way it seemed obvious to me to do it isn't the way that anyone else has chosen. Take the example of movsi: (define_insn "movsi" [(set (match_operand:SI 0 "general_operand" "=m,r,r,r") (match_operand:SI 1 "general_operand" "r,r,m,i"))] "" "* { int i; switch( which_alternative ){ case 0: ... I've given each possible valid constraint as an alternative. Most of the exising .md files give a very general constraint and then use code to look at the operand to select the instruction. A friend of my also wondered about having multiple definitions of movsi one for each kind. Which is the best way to do this? Are there any penalties for using a particular choice (ie do some ways slow down gcc)? I'm only a fraction of the way into writing my .md file so I'd greatly appreciate any advice. Lee -- Lee McLoughlin phone: 01 589 5111 X 5028 fax: 01 581 8024 Department of Computing,Imperial College,180 Queens Gate,London SW7 2BZ, UK Janet: lmjm@uk.ac.ic.doc Uucp: lmjm@icdoc.UUCP (or ..!ukc!icdoc!lmjm) DARPA: lmjm@doc.ic.ac.uk (or lmjm%uk.ac.ic.doc@nsfnet-relay.ac.uk)