OSDN Git Service

(nonlocal_goto): Emit barrier after jump.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Mar 1996 18:54:00 +0000 (18:54 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Mar 1996 18:54:00 +0000 (18:54 +0000)
(setjmp{,_64,_32}): New patterns.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11520 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/sparc/sparc.md

index bfe83bc..817e5e0 100644 (file)
   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;
 }")
 
   [(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"