builtins.c (expand_builtin_setjmp): Set current_function_calls_setjmp.
* builtins.c (expand_builtin_setjmp): Set current_function_calls_setjmp. (expand_builtin_longjmp): Set current_function_calls_longjmp. * config/sparc/sparc.md (builtin_setjmp_setup): New expand. (do_builtin_setjmp_setup): New insn. From-SVN: r37461
This commit is contained in:
parent
3401c26b5c
commit
f36d6244de
@ -1,3 +1,12 @@
|
||||
2000-11-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* builtins.c (expand_builtin_setjmp): Set
|
||||
current_function_calls_setjmp.
|
||||
(expand_builtin_longjmp): Set current_function_calls_longjmp.
|
||||
|
||||
* config/sparc/sparc.md (builtin_setjmp_setup): New expand.
|
||||
(do_builtin_setjmp_setup): New insn.
|
||||
|
||||
Tue Nov 14 12:34:56 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* tree.c (get_unwidened): Use host_integerp and tree_low_cst.
|
||||
|
@ -446,6 +446,7 @@ expand_builtin_setjmp (buf_addr, target, first_label, next_label)
|
||||
calls may traverse the arc back to this label. */
|
||||
|
||||
current_function_has_nonlocal_label = 1;
|
||||
current_function_calls_setjmp = 1;
|
||||
nonlocal_goto_handler_labels
|
||||
= gen_rtx_EXPR_LIST (VOIDmode, lab1, nonlocal_goto_handler_labels);
|
||||
|
||||
@ -547,6 +548,8 @@ expand_builtin_longjmp (buf_addr, value)
|
||||
if (value != const1_rtx)
|
||||
abort ();
|
||||
|
||||
current_function_calls_longjmp = 1;
|
||||
|
||||
#ifdef HAVE_builtin_longjmp
|
||||
if (HAVE_builtin_longjmp)
|
||||
emit_insn (gen_builtin_longjmp (buf_addr));
|
||||
|
@ -50,6 +50,7 @@
|
||||
;; 2 goto_handler_and_restore
|
||||
;; 3 goto_handler_and_restore_v9*
|
||||
;; 4 flush
|
||||
;; 5 do_builtin_setjmp_setup
|
||||
;;
|
||||
|
||||
;; The upper 32 fp regs on the v9 can't hold SFmode values. To deal with this
|
||||
@ -9014,6 +9015,32 @@
|
||||
;; [(set_attr "type" "misc")
|
||||
;; (set_attr "length" "2,3")])
|
||||
|
||||
;; For __builtin_setjmp we need to flush register windows iff the function
|
||||
;; calls alloca as well, because otherwise the register window might be
|
||||
;; saved after %sp adjustement and thus setjmp would crash
|
||||
(define_expand "builtin_setjmp_setup"
|
||||
[(match_operand 0 "register_operand" "r")]
|
||||
""
|
||||
"
|
||||
{
|
||||
emit_insn (gen_do_builtin_setjmp_setup ());
|
||||
DONE;
|
||||
}")
|
||||
|
||||
(define_insn "do_builtin_setjmp_setup"
|
||||
[(unspec_volatile [(const_int 0)] 5)]
|
||||
""
|
||||
"*
|
||||
{
|
||||
if (!current_function_calls_alloca)
|
||||
return \"\";
|
||||
if (TARGET_V9)
|
||||
return \"flushw\";
|
||||
return \"ta\\t3\";
|
||||
}"
|
||||
[(set_attr "type" "misc")
|
||||
(set_attr "length" "1")])
|
||||
|
||||
;; Pattern for use after a setjmp to store FP and the return register
|
||||
;; into the stack area.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user