Commit 8fa4e1b4 by Jeffrey A Law Committed by Jeff Law

mips.c (mips_expand_prologue): Handle large frame with no outgoing arguments for mips16.

        * mips.c (mips_expand_prologue): Handle large frame with no outgoing
        arguments for mips16.
        (mips_expand_epilogue): Pass "orig_tsize" to save_restore_insns.
        Don't lose if tsize is zero after handling large stack for mips16.
        * mips.md (return): For trivial return, return address is in $31.

From-SVN: r17294
parent eb774d8d
Mon Jan 5 11:39:49 1998 Jeffrey A Law (law@cygnus.com)
* mips.c (mips_expand_prologue): Handle large frame with no outgoing
arguments for mips16.
(mips_expand_epilogue): Pass "orig_tsize" to save_restore_insns.
Don't lose if tsize is zero after handling large stack for mips16.
* mips.md (return): For trivial return, return address is in $31.
Sun Jan 4 20:24:00 1998 Nigel Stephens <nigel@algor.co.uk> Sun Jan 4 20:24:00 1998 Nigel Stephens <nigel@algor.co.uk>
* mips/mips16.S: Various changes to make it work with -msingle-float * mips/mips16.S: Various changes to make it work with -msingle-float
......
/* Subroutines for insn-output.c for MIPS /* Subroutines for insn-output.c for MIPS
Copyright (C) 1989, 90, 91, 93-96, 1997 Free Software Foundation, Inc. Copyright (C) 1989, 90, 91, 93-97, 1998 Free Software Foundation, Inc.
Contributed by A. Lichnewsky, lich@inria.inria.fr. Contributed by A. Lichnewsky, lich@inria.inria.fr.
Changes by Michael Meissner, meissner@osf.org. Changes by Michael Meissner, meissner@osf.org.
64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
...@@ -6559,9 +6559,10 @@ mips_expand_prologue () ...@@ -6559,9 +6559,10 @@ mips_expand_prologue ()
else if (TARGET_64BIT) else if (TARGET_64BIT)
insn = emit_insn (gen_movdi (hard_frame_pointer_rtx, stack_pointer_rtx)); insn = emit_insn (gen_movdi (hard_frame_pointer_rtx, stack_pointer_rtx));
else else
insn= emit_insn (gen_movsi (hard_frame_pointer_rtx, stack_pointer_rtx)); insn = emit_insn (gen_movsi (hard_frame_pointer_rtx, stack_pointer_rtx));
RTX_FRAME_RELATED_P (insn) = 1; if (insn)
RTX_FRAME_RELATED_P (insn) = 1;
} }
if (TARGET_ABICALLS && mips_abi != ABI_32) if (TARGET_ABICALLS && mips_abi != ABI_32)
...@@ -6749,7 +6750,7 @@ mips_expand_epilogue () ...@@ -6749,7 +6750,7 @@ mips_expand_epilogue ()
& (1L << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST)))) & (1L << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST))))
emit_insn (gen_blockage ()); emit_insn (gen_blockage ());
save_restore_insns (FALSE, tmp_rtx, tsize, (FILE *)0); save_restore_insns (FALSE, tmp_rtx, orig_tsize, (FILE *)0);
/* In mips16 mode with a large frame, we adjust the stack /* In mips16 mode with a large frame, we adjust the stack
pointer before restoring the registers. In this case, we pointer before restoring the registers. In this case, we
...@@ -6759,10 +6760,10 @@ mips_expand_epilogue () ...@@ -6759,10 +6760,10 @@ mips_expand_epilogue ()
abort (); abort ();
emit_insn (gen_blockage ()); emit_insn (gen_blockage ());
if (TARGET_LONG64) if (TARGET_LONG64 && tsize != 0)
emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx, emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx,
tsize_rtx)); tsize_rtx));
else else if (tsize != 0)
emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
tsize_rtx)); tsize_rtx));
} }
......
/* Definitions of target machine for GNU compiler. MIPS version. /* Definitions of target machine for GNU compiler. MIPS version.
Copyright (C) 1989, 90-6, 1997 Free Software Foundation, Inc. Copyright (C) 1989, 90-97, 1998 Free Software Foundation, Inc.
Contributed by A. Lichnewsky (lich@inria.inria.fr). Contributed by A. Lichnewsky (lich@inria.inria.fr).
Changed by Michael Meissner (meissner@osf.org). Changed by Michael Meissner (meissner@osf.org).
64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
;; Changes by Michael Meissner, meissner@osf.org ;; Changes by Michael Meissner, meissner@osf.org
;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and ;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
;; Brendan Eich, brendan@microunity.com. ;; Brendan Eich, brendan@microunity.com.
;; Copyright (C) 1989, 90-96, 1997 Free Software Foundation, Inc. ;; Copyright (C) 1989, 90-97, 1998 Free Software Foundation, Inc.
;; This file is part of GNU CC. ;; This file is part of GNU CC.
...@@ -8790,12 +8790,7 @@ move\\t%0,%z4\\n\\ ...@@ -8790,12 +8790,7 @@ move\\t%0,%z4\\n\\
(define_insn "return" (define_insn "return"
[(return)] [(return)]
"mips_can_use_return_insn ()" "mips_can_use_return_insn ()"
"* "%*j\\t$31"
{
if (TARGET_MIPS16)
return \"%*j\\t$7\";
return \"%*j\\t$31\";
}"
[(set_attr "type" "jump") [(set_attr "type" "jump")
(set_attr "mode" "none") (set_attr "mode" "none")
(set_attr "length" "1")]) (set_attr "length" "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