summaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-01-05 10:45:59 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-01-05 10:45:59 +0000
commitd3eeb4f45787d0d10743db34fac12bb94d3beae8 (patch)
treee8e817de0f597241d337f31c2b573ab6bbec257d /gcc/config/mips
parent823b9ac6c68176e017fb0e3db2b3727185062f1a (diff)
downloadgcc-d3eeb4f45787d0d10743db34fac12bb94d3beae8.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17294 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/mips.c13
-rw-r--r--gcc/config/mips/mips.h2
-rw-r--r--gcc/config/mips/mips.md9
3 files changed, 10 insertions, 14 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 6ea2659ba1c..ebcf0fb0d0f 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -1,5 +1,5 @@
/* 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.
Changes by Michael Meissner, meissner@osf.org.
64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
@@ -6559,9 +6559,10 @@ mips_expand_prologue ()
else if (TARGET_64BIT)
insn = emit_insn (gen_movdi (hard_frame_pointer_rtx, stack_pointer_rtx));
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)
@@ -6749,7 +6750,7 @@ mips_expand_epilogue ()
& (1L << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST))))
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
pointer before restoring the registers. In this case, we
@@ -6759,10 +6760,10 @@ mips_expand_epilogue ()
abort ();
emit_insn (gen_blockage ());
- if (TARGET_LONG64)
+ if (TARGET_LONG64 && tsize != 0)
emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx,
tsize_rtx));
- else
+ else if (tsize != 0)
emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
tsize_rtx));
}
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index e0b9cc39ee5..76b864410a7 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -1,5 +1,5 @@
/* 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).
Changed by Michael Meissner (meissner@osf.org).
64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 8fd4dfdaddf..bf44a6f1d19 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -3,7 +3,7 @@
;; Changes by Michael Meissner, meissner@osf.org
;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
;; 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.
@@ -8790,12 +8790,7 @@ move\\t%0,%z4\\n\\
(define_insn "return"
[(return)]
"mips_can_use_return_insn ()"
- "*
-{
- if (TARGET_MIPS16)
- return \"%*j\\t$7\";
- return \"%*j\\t$31\";
-}"
+ "%*j\\t$31"
[(set_attr "type" "jump")
(set_attr "mode" "none")
(set_attr "length" "1")])