(casesi_jump): New pattern.
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 7 Aug 1996 23:02:30 +0000 (16:02 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 7 Aug 1996 23:02:30 +0000 (16:02 -0700)
(casesi): Generate RTL to match it.

From-SVN: r12600

gcc/config/sh/sh.md

index 91fa45832142f49f1de4f95e71f5ee8a6d2b3eb4..2371bf3bd150b482c58b6a4fb4c3ab643432b27f 100644 (file)
   "jmp @%0%#"
   [(set_attr "needs_delay_slot" "yes")])
 
+;; This might seem redundant, but it helps us distinguish case table jumps
+;; which can be present in structured code from indirect jumps which can not
+;; be present in structured code.  This allows -fprofile-arcs to work.
+
+(define_insn "*casesi_jump"
+  [(set (pc)
+       (match_operand:SI 0 "arith_reg_operand" "r"))
+   (use (label_ref (match_operand 1 "" "")))]
+  ""
+  "jmp @%0%#"
+  [(set_attr "needs_delay_slot" "yes")])
+
 ;; Call subroutine returning any type.
 ;; ??? This probably doesn't work.
 
                                       (mem:HI (plus:SI (reg:SI 0)
                                                        (match_dup 6)))))
              (set (match_dup 6) (mem:HI (plus:SI (reg:SI 0) (match_dup 6))))])
-   (set (pc) (reg:SI 0))]
+   (parallel [(set (pc) (reg:SI 0))
+             (use (label_ref (match_dup 3)))])]
   ""
   "
 {