self@BAYES.ARC.NASA.GOV (Matthew Self) (03/16/89)
There are a couple of improvements which can be made to the handling of compare instructions in m68k.md. Both cmpsi and cmphi ommit the cmp a0@+, a1@+ addressing mode (but cmpqi doesn't). Also, on the 68020 and 68030 (at least), cmp <EA>, d0 is faster than cmpa <EA>, a0, so I have added register prefernces to try to make this happen. Could someone more familiar with m68k.md double check these changes? Matthew Self NASA Ames Research Center self@bayes.arc.nasa.gov *** gcc/m68k.md Wed Feb 22 09:31:17 1989 --- gcc-pld/m68k.md Wed Mar 15 13:29:37 1989 *************** *** 364,372 **** ;; compare instructions. ! ;; A composite of the cmp, cmpa, & cmpi m68000 op codes. (define_insn "cmpsi" [(set (cc0) ! (compare (match_operand:SI 0 "general_operand" "rKs,mr") ! (match_operand:SI 1 "general_operand" "mr,Ksr")))] "" "* --- 364,373 ---- ;; compare instructions. ! ;; A composite of the cmp, cmpa, cmpi, and cmpm m68000 op codes. ! ;; cmp is faster than cmpa on 68020 and 68030 -- self@bayes.arc.nasa.gov (define_insn "cmpsi" [(set (cc0) ! (compare (match_operand:SI 0 "general_operand" "d*aKs,md*a,>") ! (match_operand:SI 1 "general_operand" "md*a,Ksd*a,>")))] "" "* *************** *** 390,395 **** (define_insn "cmphi" [(set (cc0) ! (compare (match_operand:HI 0 "general_operand" "rn,mr") ! (match_operand:HI 1 "general_operand" "mr,nr")))] "" "* --- 391,396 ---- (define_insn "cmphi" [(set (cc0) ! (compare (match_operand:HI 0 "general_operand" "d*an,md*a,>") ! (match_operand:HI 1 "general_operand" "md*a,nd*a,>")))] "" "*