mips.h (GO_IF_LEGITIMATE_ADDRESS): Don't accept large register offsets; let LEGITIMIZ...
authorStan Cox <scox@cygnus.com>
Thu, 23 Sep 1999 01:03:13 +0000 (01:03 +0000)
committerStan Cox <scox@gcc.gnu.org>
Thu, 23 Sep 1999 01:03:13 +0000 (01:03 +0000)
* mips.h (GO_IF_LEGITIMATE_ADDRESS): Don't accept large
register offsets; let LEGITIMIZE_ADDRESS load it into a register.
(LEGITIMIZE_ADDRESS): Use plus_constant to avoid (plus (reg) (const_int 0))
* mips.md (call_internal3c): New pattern for -mips16 -mlong-calls.

From-SVN: r29608

gcc/ChangeLog
gcc/config/mips/mips.h
gcc/config/mips/mips.md

index fbccd91adfdbddace0168c0282a71fbfb7d7a4f5..a381ea8f278a53ac5cb8eb93af0c736ec3285fb7 100644 (file)
@@ -1,3 +1,11 @@
+Wed Sep 22 17:58:01 1999  Stan Cox  <scox@cygnus.com>
+
+       * mips.h (GO_IF_LEGITIMATE_ADDRESS): Don't accept large
+       register offsets; let LEGITIMIZE_ADDRESS load it into a register.
+       (LEGITIMIZE_ADDRESS): Use plus_constant to avoid
+       (plus (reg) (const_int 0))
+       * mips.md (call_internal3c): New pattern for -mips16 -mlong-calls.
+       
 Wed Sep 22 17:55:31 1999  David Edelsohn  <edelsohn@gnu.org>
 
        * rs6000.c (expand_block_move): DImode loads and stores require
index 59476dba198f65f90457626f6accd039dae1995e..61a1dfe61c10b39ad1ad54191916c24e51ac33d8 100644 (file)
@@ -2966,6 +2966,7 @@ extern struct rtx_def *mips_va_arg ();
              && (!TARGET_EMBEDDED_PIC                                  \
                  || code1 != CONST                                     \
                  || GET_CODE (XEXP (xplus1, 0)) != MINUS)              \
+             && ! (code1 == CONST_INT && ! SMALL_INT (xplus1))         \
              && !TARGET_MIPS16)                                        \
            goto ADDR;                                                  \
        }                                                               \
@@ -3125,8 +3126,7 @@ extern struct rtx_def *mips_va_arg ();
                                  ptr_reg,                              \
                                  gen_rtx_PLUS (Pmode, xplus0, int_reg))); \
                                                                        \
-         X = gen_rtx_PLUS (Pmode, ptr_reg,                             \
-                           GEN_INT (INTVAL (xplus1) & 0x7fff));        \
+         X = plus_constant (ptr_reg, INTVAL (xplus1) & 0x7fff);        \
          goto WIN;                                                     \
        }                                                               \
     }                                                                  \
index 4b52cd2081a0a054bd234e175c869fd532c1433a..d6e533b11642ad405fea085cfc9bfffcc49a7258 100644 (file)
@@ -9591,7 +9591,8 @@ move\\t%0,%z4\\n\\
   [(call (mem:SI (match_operand:SI 0 "register_operand" "r"))
         (match_operand 1 "" "i"))
    (clobber (match_operand:SI 2 "register_operand" "=d"))]
-  "!(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS"
+  "!TARGET_MIPS16
+   && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS"
   "%*jal\\t%2,%0"
   [(set_attr "type"    "call")
    (set_attr "mode"    "none")])
@@ -9600,7 +9601,19 @@ move\\t%0,%z4\\n\\
   [(call (mem:DI (match_operand:DI 0 "se_register_operand" "r"))
         (match_operand 1 "" "i"))
    (clobber (match_operand:SI 2 "register_operand" "=d"))]
-  "Pmode == DImode && !TARGET_ABICALLS && TARGET_LONG_CALLS"
+  "!TARGET_MIPS16
+   && Pmode == DImode && !TARGET_ABICALLS && TARGET_LONG_CALLS"
+  "%*jal\\t%2,%0"
+  [(set_attr "type"    "call")
+   (set_attr "mode"    "none")
+   (set_attr "length"  "1")])
+
+(define_insn "call_internal3c"
+  [(call (mem:SI (match_operand:SI 0 "register_operand" "e"))
+        (match_operand 1 "" "i"))
+   (clobber (match_operand:SI 2 "register_operand" "=y"))]
+  "TARGET_MIPS16 && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS
+   && GET_CODE (operands[2]) == REG && REGNO (operands[2]) == 31"
   "%*jal\\t%2,%0"
   [(set_attr "type"    "call")
    (set_attr "mode"    "none")])