diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1996-08-07 16:02:30 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1996-08-07 16:02:30 -0700 |
commit | f1ffca1c5abf40791b999b745040e16d52a3fe71 (patch) | |
tree | 282aa4a33bc6209b4eb288e8bf2f16ef3daf19ca | |
parent | 61b2fbe73e4cf6c703305edfe0a7435381195056 (diff) | |
download | gcc-f1ffca1c5abf40791b999b745040e16d52a3fe71.zip gcc-f1ffca1c5abf40791b999b745040e16d52a3fe71.tar.gz gcc-f1ffca1c5abf40791b999b745040e16d52a3fe71.tar.bz2 |
(casesi_jump): New pattern.
(casesi): Generate RTL to match it.
From-SVN: r12600
-rw-r--r-- | gcc/config/sh/sh.md | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 91fa458..2371bf3 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -1691,6 +1691,18 @@ "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. @@ -1783,7 +1795,8 @@ (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)))])] "" " { |