This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: -mips16 -mlong-calls
- To: egcs-patches at cygnus dot com
- Subject: PATCH: -mips16 -mlong-calls
- From: Stan Cox <scox at cygnus dot com>
- Date: Tue, 12 Jan 1999 14:15:46 -0500
This patch adds a pattern for -mips16 when the -mlong-calls is
specified to prevent the attempted use of an illegal register. (wilson/law)
Tue Jan 12 10:23:24 1999 Stan Cox <scox@cygnus.com>
* mips.md (call_value_internal3c): New pattern for -mips16 -mlong-calls.
Index: config/mips/mips.md
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/mips/mips.md,v
retrieving revision 1.152
diff -u -p -u -r1.152 mips.md
--- config/mips/mips.md 1999/01/07 08:36:22 1.152
+++ config/mips/mips.md 1999/01/12 18:26:56
@@ -10601,7 +10601,8 @@ move\\t%0,%z4\\n\\
(call (mem:SI (match_operand:SI 1 "register_operand" "r"))
(match_operand 2 "" "i")))
(clobber (match_operand:SI 3 "register_operand" "=d"))]
- "!(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS"
+ "!TARGET_MIPS16
+ && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS"
"%*jal\\t%3,%1"
[(set_attr "type" "call")
(set_attr "mode" "none")
@@ -10612,7 +10613,20 @@ move\\t%0,%z4\\n\\
(call (mem:DI (match_operand:DI 1 "se_register_operand" "r"))
(match_operand 2 "" "i")))
(clobber (match_operand:SI 3 "register_operand" "=d"))]
- "Pmode == DImode && !TARGET_ABICALLS && TARGET_LONG_CALLS"
+ "!TARGET_MIPS16
+ && Pmode == DImode && !TARGET_ABICALLS && TARGET_LONG_CALLS"
+ "%*jal\\t%3,%1"
+ [(set_attr "type" "call")
+ (set_attr "mode" "none")
+ (set_attr "length" "1")])
+
+(define_insn "call_value_internal3c"
+ [(set (match_operand 0 "register_operand" "=df")
+ (call (mem:SI (match_operand:SI 1 "register_operand" "e"))
+ (match_operand 2 "" "i")))
+ (clobber (match_operand:SI 3 "register_operand" "=y"))]
+ "TARGET_MIPS16 && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS
+ && GET_CODE (operands[3]) == REG && REGNO (operands[3]) == 31"
"%*jal\\t%3,%1"
[(set_attr "type" "call")
(set_attr "mode" "none")