Article View: gnu.gcc.bug
Article #2411improvements to m68k.md
From: Matthew Self
Date: Wed, 15 Mar 1989 23:59
Date: Wed, 15 Mar 1989 23:59
52 lines
2087 bytes
2087 bytes
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,>")))]
""
"*
Technical Details
Message-ID:
<8903152359.AA04941@bayes.arc.nasa.gov>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BAYES.ARC.NASA.GOV!selfShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BAYES.ARC.NASA.GOV!self From: self@BAYES.ARC.NASA.GOV (Matthew Self) Newsgroups: gnu.gcc.bug Subject: improvements to m68k.md Message-ID: <8903152359.AA04941@bayes.arc.nasa.gov> Date: 15 Mar 89 23:59:16 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 52