Commit d337d653 by Jan Hubicka Committed by Jan Hubicka

i960.md (ret): Set PC.

	* i960.md (ret): Set PC.
	(nonlocal_goto): Fix expander.
	* builtins.c (epxand_builin_longjmp): Check that we've emitted
	some jump or call.

From-SVN: r51478
parent 218aa620
Wed Mar 27 23:19:30 CET 2002 Jan Hubicka <jh@suse.cz>
* i960.md (ret): Set PC.
(nonlocal_goto): Fix expander.
* builtins.c (epxand_builin_longjmp): Check that we've emitted
some jump or call.
Wed Mar 27 23:11:35 CET 2002 Jan Hubicka <jh@suse.cz> Wed Mar 27 23:11:35 CET 2002 Jan Hubicka <jh@suse.cz>
* optabs.c (emit_no_conflict_block, emit_libcall_block): Avoid nesting * optabs.c (emit_no_conflict_block, emit_libcall_block): Avoid nesting
......
...@@ -639,7 +639,7 @@ void ...@@ -639,7 +639,7 @@ void
expand_builtin_longjmp (buf_addr, value) expand_builtin_longjmp (buf_addr, value)
rtx buf_addr, value; rtx buf_addr, value;
{ {
rtx fp, lab, stack, insn; rtx fp, lab, stack, insn, last;
enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL);
if (setjmp_alias_set == -1) if (setjmp_alias_set == -1)
...@@ -662,6 +662,7 @@ expand_builtin_longjmp (buf_addr, value) ...@@ -662,6 +662,7 @@ expand_builtin_longjmp (buf_addr, value)
current_function_calls_longjmp = 1; current_function_calls_longjmp = 1;
last = get_last_insn ();
#ifdef HAVE_builtin_longjmp #ifdef HAVE_builtin_longjmp
if (HAVE_builtin_longjmp) if (HAVE_builtin_longjmp)
emit_insn (gen_builtin_longjmp (buf_addr)); emit_insn (gen_builtin_longjmp (buf_addr));
...@@ -707,6 +708,8 @@ expand_builtin_longjmp (buf_addr, value) ...@@ -707,6 +708,8 @@ expand_builtin_longjmp (buf_addr, value)
internal exception handling use only. */ internal exception handling use only. */
for (insn = get_last_insn (); insn; insn = PREV_INSN (insn)) for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
{ {
if (insn == last)
abort ();
if (GET_CODE (insn) == JUMP_INSN) if (GET_CODE (insn) == JUMP_INSN)
{ {
REG_NOTES (insn) = alloc_EXPR_LIST (REG_NON_LOCAL_GOTO, const0_rtx, REG_NOTES (insn) = alloc_EXPR_LIST (REG_NON_LOCAL_GOTO, const0_rtx,
......
...@@ -2365,8 +2365,7 @@ ...@@ -2365,8 +2365,7 @@
;; stack pointer, frame pointer, previous frame pointer and the return ;; stack pointer, frame pointer, previous frame pointer and the return
;; instruction pointer. ;; instruction pointer.
(define_insn "ret" (define_insn "ret"
[(use (reg:SI 16)) [(set (pc) (unspec_volatile [(reg:SI 16)] 3))]
(unspec_volatile [(const_int 0)] 3)]
"" ""
"ret" "ret"
[(set_attr "type" "branch") [(set_attr "type" "branch")
...@@ -2424,7 +2423,7 @@ ...@@ -2424,7 +2423,7 @@
because we are very careful to ret from the exact save area in because we are very careful to ret from the exact save area in
use during the original call. */ use during the original call. */
emit_insn (gen_ret ()); emit_jump_insn (gen_ret ());
emit_barrier (); emit_barrier ();
DONE; DONE;
}") }")
......
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