OSDN Git Service

* sparc/sp64-elf.h ({CPP,ASM,LINK}_SPEC): Add little endian support.
[pf3gnuchains/gcc-fork.git] / gcc / except.h
1 /* Exception Handling interface routines.
2    Copyright (C) 1996 Free Software Foundation, Inc.
3    Contributed by Mike Stump <mrs@cygnus.com>.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22
23 #ifndef GET_CODE
24 #define rtx int *
25 #endif
26
27 #ifdef TREE_CODE
28
29 struct label_node {
30   union {
31     rtx rlabel;
32     tree tlabel;
33   } u;
34   struct label_node *chain;
35 };
36
37 /* A entry for the exception handling stack EHSTACK or the exception
38    handling queue EHQUEUE.  */
39 struct eh_entry {
40   rtx start_label;
41   rtx end_label;
42   rtx exception_handler_label;
43
44   tree finalization;
45 };
46
47 struct eh_node {
48   struct eh_entry *entry;
49   struct eh_node *chain;
50 };
51
52 struct eh_stack {
53   struct eh_node *top;
54 };
55
56 struct eh_queue {
57   struct eh_node *head;
58   struct eh_node *tail;
59 };
60
61
62 extern void push_label_entry                    PROTO((struct label_node **labelstack, rtx rlabel, tree tlabel));
63 extern rtx pop_label_entry                      PROTO((struct label_node **labelstack));
64 extern tree top_label_entry                     PROTO((struct label_node **labelstack));
65
66 extern struct eh_stack ehstack;
67 extern struct eh_queue ehqueue;
68 extern rtx catch_clauses;
69 extern tree protect_list;
70
71 #endif
72
73 struct function;
74
75 extern void init_eh                             PROTO((void));
76 extern void init_eh_for_function                PROTO((void));
77 extern void save_eh_status                      PROTO((struct function *p));
78 extern void restore_eh_status                   PROTO((struct function *p));
79 extern void add_eh_table_entry                  PROTO((int));
80 extern int exception_table_p                    PROTO((void));
81 extern void output_exception_table              PROTO((void));
82 extern rtx eh_outer_context                     PROTO((rtx));
83 extern void emit_unwinder                       PROTO((void));
84 extern void end_eh_unwinder                     PROTO((void));
85 extern void find_handler_labels                 PROTO((void));
86 extern void check_handler_labels                PROTO((void));
87
88
89 extern struct label_node *caught_return_label_stack;
90 extern struct label_node *false_label_stack;
91
92 extern rtx exception_handler_labels;
93
94 /* The rtx for the saved PC value.  */
95
96 extern rtx eh_saved_pc_rtx;
97
98 extern void exception_optimize                  PROTO((void));