Commit 9fb8a974 by Richard Kenner

(tablejump): Add SIGN_EXTEND to HImode offset so can add to SImode PC.

Likewise for matching pattern.

From-SVN: r7938
parent f7936742
......@@ -4492,7 +4492,8 @@
"
{
#ifdef CASE_VECTOR_PC_RELATIVE
operands[0] = gen_rtx (PLUS, SImode, pc_rtx, operands[0]);
operands[0] = gen_rtx (PLUS, SImode, pc_rtx,
gen_rtx (SIGN_EXTEND, SImode, operands[0]));
#endif
}")
......@@ -4512,7 +4513,8 @@
;; Jump to variable address from dispatch table of relative addresses.
(define_insn ""
[(set (pc)
(plus:SI (pc) (match_operand:HI 0 "register_operand" "r")))
(plus:SI (pc)
(sign_extend:SI (match_operand:HI 0 "register_operand" "r"))))
(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