(tablejump): Add SIGN_EXTEND to HImode offset so can add to SImode PC.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 17 Aug 1994 22:03:02 +0000 (18:03 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 17 Aug 1994 22:03:02 +0000 (18:03 -0400)
Likewise for matching pattern.

From-SVN: r7938

gcc/config/m68k/m68k.md

index 04f1d70df1a07cbb7889a30d1b7ab246712d525a..6815a067c591e538cd5398a64056607e1a404760 100644 (file)
   "
 {
 #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
 }")
 
 ;; 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 "" "")))]
   ""
   "*