Commit f7936742 by Richard Kenner

(casesi_2): Operand 0 is HImode; add SIGN_EXTEND when adding to pc.

(casesi): Operand 0 is HImode.
(unnamed PC addition pattern): Add SIGN_EXTEND to add HImode offset to
SImode PC.

From-SVN: r7937
parent 40ef0937
...@@ -2238,11 +2238,11 @@ ...@@ -2238,11 +2238,11 @@
"") "")
(define_expand "casesi_2" (define_expand "casesi_2"
[(set (match_operand:SI 0 "" "") (mem:HI (match_operand:SI 1 "" ""))) [(set (match_operand:HI 0 "" "") (mem:HI (match_operand:SI 1 "" "")))
;; The USE here is so that at least one jump-insn will refer to the label, ;; The USE here is so that at least one jump-insn will refer to the label,
;; to keep it alive in jump_optimize. ;; to keep it alive in jump_optimize.
(parallel [(set (pc) (parallel [(set (pc)
(plus:SI (pc) (match_dup 0))) (plus:SI (pc) (sign_extend:SI (match_dup 0))))
(use (label_ref (match_operand 2 "" "")))])] (use (label_ref (match_operand 2 "" "")))])]
"" ""
"") "")
...@@ -2253,7 +2253,7 @@ ...@@ -2253,7 +2253,7 @@
(define_expand "casesi" (define_expand "casesi"
;; We don't use these for generating the RTL, but we must describe ;; We don't use these for generating the RTL, but we must describe
;; the operands here. ;; the operands here.
[(match_operand:SI 0 "general_operand" "") [(match_operand:HI 0 "general_operand" "")
(match_operand:SI 1 "immediate_operand" "") (match_operand:SI 1 "immediate_operand" "")
(match_operand:SI 2 "general_operand" "") (match_operand:SI 2 "general_operand" "")
(match_operand 3 "" "") (match_operand 3 "" "")
...@@ -2285,7 +2285,8 @@ ...@@ -2285,7 +2285,8 @@
;; Recognize one of the insns resulting from casesi_2. ;; Recognize one of the insns resulting from casesi_2.
(define_insn "" (define_insn ""
[(set (pc) [(set (pc)
(plus:SI (pc) (match_operand:HI 0 "general_operand" "r"))) (plus:SI (pc)
(sign_extend:SI (match_operand:HI 0 "general_operand" "r"))))
(use (label_ref (match_operand 1 "" "")))] (use (label_ref (match_operand 1 "" "")))]
"" ""
"* "*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment