aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-03-12 13:54:00 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1996-03-12 13:54:00 -0500
commitbf1b20dab8c1b971e2330918fe4b3707b7f876db (patch)
tree7d4e72dd4dc15d71ff9a4c57baf5dcbcd2c5c71a /gcc/config
parentf2420d0b9230d2376c12380ce402f212be8714d8 (diff)
downloadgcc-bf1b20dab8c1b971e2330918fe4b3707b7f876db.zip
gcc-bf1b20dab8c1b971e2330918fe4b3707b7f876db.tar.gz
gcc-bf1b20dab8c1b971e2330918fe4b3707b7f876db.tar.bz2
(nonlocal_goto): Emit barrier after jump.
(setjmp{,_64,_32}): New patterns. From-SVN: r11520
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/sparc/sparc.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index bfe83bc..817e5e0 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -5429,6 +5429,7 @@
emit_insn (gen_rtx (USE, VOIDmode, static_chain_rtx));
/* Return, restoring reg window and jumping to goto handler. */
emit_insn (gen_goto_handler_and_restore ());
+ emit_barrier ();
DONE;
}")
@@ -5448,6 +5449,36 @@
[(set_attr "type" "misc")
(set_attr "length" "2")])
+;; Pattern for use after a setjmp to store FP and the return register
+;; into the stack area.
+
+(define_expand "setjmp"
+ [(const_int 0)]
+ ""
+ "
+{
+ if (TARGET_ARCH64)
+ emit_insn (gen_setjmp_64 ());
+ else
+ emit_insn (gen_setjmp_32 ());
+
+ DONE;
+}")
+
+(define_expand "setjmp_32"
+ [(set (mem:SI (plus:SI (reg:SI 14) (const_int 56))) (match_dup 0))
+ (set (mem:SI (plus:SI (reg:SI 14) (const_int 60))) (reg:SI 31))]
+ ""
+ "
+{ operands[0] = frame_pointer_rtx; }")
+
+(define_expand "setjmp_64"
+ [(set (mem:DI (plus:DI (reg:DI 14) (const_int 112))) (match_dup 0))
+ (set (mem:DI (plus:DI (reg:DI 14) (const_int 120))) (reg:DI 31))]
+ ""
+ "
+{ operands[0] = frame_pointer_rtx; }")
+
;; Special pattern for the FLUSH instruction.
(define_insn "flush"