Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
21451173
Commit
21451173
authored
Dec 28, 1995
by
Mike Stump
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
77th Cygnus<->FSF merge
From-SVN: r10894
parent
9ad61776
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
48 deletions
+140
-48
gcc/cp/ChangeLog
+38
-2
gcc/cp/decl.c
+9
-0
gcc/cp/decl2.c
+31
-38
gcc/cp/except.c
+60
-8
gcc/cp/sig.c
+2
-0
No files found.
gcc/cp/ChangeLog
View file @
21451173
Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
* except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
NORMAL_RETURN_ADDR_OFFSET.
(end_eh_unwinder): Ditto.
Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
* gc.c (build_dynamic_cast): Make sure we don't cast away const
when dealing with references, and make sure we handle dynamic
casting to a cv qualified reference.
Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
* except.c (struct eh_context): New structure top hold eh context
information.
(push_eh_context): New routine.
(pop_eh_context): Ditto.
* decl.c (push_cp_function_context): Use them.
(pop_cp_function_context): Ditto.
Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_file): Also prune uninteresting functions in the
inline emission loop.
Wed Dec 20 02:32:07 1995 Jeffrey A Law (law@cygnus.com)
* sig.c (build_signature_table_constructor): Mark functions
in the signature as referenced.
Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_file): Do all the vtable/synthesis stuff before
the inline emission stuff.
Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h, decl2.c (flag_weak): New flag to control the use of
...
...
@@ -331,7 +367,7 @@ Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
* parse.y (fn.def1): Call split_specs_attrs in
declmods notype_declarator case.
Mon Nov 20 14:06:28 1995 Mike Stump <mrs@cygnus.com
>
Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu
>
* Version 2.7.2 released.
...
...
@@ -344,7 +380,7 @@ Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
* init.c (expand_aggr_init): Handle cv qualifiers on the object's
type.
S
un Nov 12 18:09:35 1995 Mike Stump <mrs@cygnus.com
>
S
at Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu
>
* Version 2.7.1 released.
...
...
gcc/cp/decl.c
View file @
21451173
...
...
@@ -127,6 +127,8 @@ static tree grokparms PROTO((tree, int));
static
tree
lookup_nested_type
PROTO
((
tree
,
tree
));
static
char
*
redeclaration_error_message
PROTO
((
tree
,
tree
));
static
void
grok_op_properties
PROTO
((
tree
,
int
,
int
));
extern
void
*
push_eh_context
PROTO
(());
extern
void
pop_eh_context
PROTO
((
void
*
));
tree
define_function
PROTO
((
char
*
,
tree
,
enum
built_in_function
,
void
(
*
)(),
char
*
));
...
...
@@ -12807,8 +12809,11 @@ struct cp_function
rtx
result_rtx
;
struct
cp_function
*
next
;
struct
binding_level
*
binding_level
;
void
*
eh_context
;
};
struct
cp_function
*
cp_function_chain
;
extern
int
temp_name_counter
;
...
...
@@ -12848,6 +12853,8 @@ push_cp_function_context (context)
p
->
member_init_list
=
current_member_init_list
;
p
->
class_decl
=
current_class_decl
;
p
->
C_C_D
=
C_C_D
;
p
->
eh_context
=
push_eh_context
();
}
/* Restore the variables used during compilation of a C++ function. */
...
...
@@ -12901,6 +12908,8 @@ pop_cp_function_context (context)
current_class_decl
=
p
->
class_decl
;
C_C_D
=
p
->
C_C_D
;
pop_eh_context
(
p
->
eh_context
);
free
(
p
);
}
...
...
gcc/cp/decl2.c
View file @
21451173
...
...
@@ -3126,53 +3126,46 @@ finish_file ()
while
(
reconsider
)
{
tree
last
=
saved_inlines
=
tree_cons
(
NULL_TREE
,
NULL_TREE
,
saved_inlines
);
tree
last_head
=
last
;
tree
place
=
TREE_CHAIN
(
saved_inlines
);
tree
*
p
=
&
saved_inlines
;
reconsider
=
0
;
walk_vtables
((
void
(
*
)())
0
,
finish_vtable_vardecl
);
for
(;
place
;
place
=
TREE_CHAIN
(
place
)
)
while
(
*
p
)
{
tree
decl
=
TREE_VALUE
(
place
);
tree
decl
=
TREE_VALUE
(
*
p
);
/* Slice out the empty elements put in just above in the
previous reconsidering. */
if
(
decl
==
NULL_TREE
)
if
(
DECL_ARTIFICIAL
(
decl
)
&&
!
DECL_INITIAL
(
decl
)
&&
TREE_USED
(
decl
))
{
TREE_CHAIN
(
last
)
=
TREE_CHAIN
(
place
);
continue
;
synthesize_method
(
decl
);
reconsider
=
1
;
}
if
(
DECL_ARTIFICIAL
(
decl
)
&&
!
DECL_INITIAL
(
decl
))
{
if
(
TREE_USED
(
decl
))
{
synthesize_method
(
decl
);
if
(
TREE_ASM_WRITTEN
(
decl
))
reconsider
=
1
;
}
else
{
last
=
place
;
continue
;
}
}
if
(
TREE_ASM_WRITTEN
(
decl
)
||
(
DECL_SAVED_INSNS
(
decl
)
==
0
&&
!
DECL_ARTIFICIAL
(
decl
)))
*
p
=
TREE_CHAIN
(
*
p
);
else
p
=
&
TREE_CHAIN
(
*
p
);
}
}
if
(
TREE_ASM_WRITTEN
(
decl
)
||
DECL_SAVED_INSNS
(
decl
)
==
0
)
{
TREE_CHAIN
(
last
)
=
TREE_CHAIN
(
place
);
continue
;
}
reconsider
=
1
;
/* More may be referenced; check again */
while
(
reconsider
)
{
tree
*
p
=
&
saved_inlines
;
reconsider
=
0
;
if
((
TREE_PUBLIC
(
decl
)
&&
!
DECL_WEAK
(
decl
))
||
TREE_SYMBOL_REFERENCED
(
DECL_ASSEMBLER_NAME
(
decl
))
||
flag_keep_inline_functions
)
{
TREE_CHAIN
(
last
)
=
TREE_CHAIN
(
place
);
while
(
*
p
)
{
tree
decl
=
TREE_VALUE
(
*
p
);
if
(
TREE_ASM_WRITTEN
(
decl
)
||
DECL_SAVED_INSNS
(
decl
)
==
0
)
*
p
=
TREE_CHAIN
(
*
p
);
else
if
((
TREE_PUBLIC
(
decl
)
&&
!
DECL_WEAK
(
decl
))
||
TREE_SYMBOL_REFERENCED
(
DECL_ASSEMBLER_NAME
(
decl
))
||
flag_keep_inline_functions
)
{
if
(
DECL_NOT_REALLY_EXTERN
(
decl
))
{
DECL_EXTERNAL
(
decl
)
=
0
;
...
...
@@ -3182,10 +3175,10 @@ finish_file ()
permanent_allocation
(
1
);
}
continue
;
*
p
=
TREE_CHAIN
(
*
p
)
;
}
last
=
place
;
else
p
=
&
TREE_CHAIN
(
*
p
)
;
}
}
}
...
...
gcc/cp/except.c
View file @
21451173
...
...
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "obstack.h"
#include "expr.h"
#include "output.h"
tree
protect_list
;
...
...
@@ -330,7 +331,6 @@ tree saved_cleanup;
int
throw_used
;
static
rtx
catch_clauses
;
static
first_catch_label
;
static
struct
ehStack
ehstack
;
static
struct
ehQueue
ehqueue
;
...
...
@@ -352,6 +352,58 @@ static tree top_label_entry PROTO((struct labelNode **labelstack));
static
struct
ehEntry
*
copy_eh_entry
PROTO
((
struct
ehEntry
*
entry
));
/* Routines to save and restore eh context information. */
struct
eh_context
{
struct
ehStack
ehstack
;
struct
ehQueue
ehqueue
;
rtx
catch_clauses
;
struct
labelNode
*
false_label_stack
;
struct
labelNode
*
caught_return_label_stack
;
tree
protect_list
;
};
/* Save the context and push into a new one. */
void
*
push_eh_context
()
{
struct
eh_context
*
p
=
(
struct
eh_context
*
)
xmalloc
(
sizeof
(
struct
eh_context
));
p
->
ehstack
=
ehstack
;
p
->
ehqueue
=
ehqueue
;
p
->
catch_clauses
=
catch_clauses
;
p
->
false_label_stack
=
false_label_stack
;
p
->
caught_return_label_stack
=
caught_return_label_stack
;
p
->
protect_list
=
protect_list
;
new_eh_stack
(
&
ehstack
);
new_eh_queue
(
&
ehqueue
);
catch_clauses
=
NULL_RTX
;
false_label_stack
=
NULL
;
caught_return_label_stack
=
NULL
;
protect_list
=
NULL_TREE
;
return
p
;
}
/* Pop and restore the context. */
void
pop_eh_context
(
vp
)
void
*
vp
;
{
struct
eh_context
*
p
=
(
struct
eh_context
*
)
vp
;
protect_list
=
p
->
protect_list
;
caught_return_label_stack
=
p
->
caught_return_label_stack
;
false_label_stack
=
p
->
false_label_stack
;
catch_clauses
=
p
->
catch_clauses
;
ehqueue
=
p
->
ehqueue
;
ehstack
=
p
->
ehstack
;
free
(
p
);
}
/* All my cheesy stack/queue/misc data structure handling routines
...
...
@@ -1323,8 +1375,8 @@ expand_builtin_throw ()
/* Set it up so that we continue inside, at the top of the loop. */
emit_move_insn
(
ret_val
,
gen_rtx
(
LABEL_REF
,
Pmode
,
top_of_loop
));
#ifdef
NORMAL_
RETURN_ADDR_OFFSET
return_val_rtx
=
plus_constant
(
ret_val
,
-
NORMAL_
RETURN_ADDR_OFFSET
);
#ifdef RETURN_ADDR_OFFSET
return_val_rtx
=
plus_constant
(
ret_val
,
-
RETURN_ADDR_OFFSET
);
if
(
return_val_rtx
!=
ret_val
)
emit_move_insn
(
ret_val
,
return_val_rtx
);
#endif
...
...
@@ -1434,7 +1486,7 @@ expand_end_eh_spec (raises)
void
expand_exception_blocks
()
{
static
rtx
funcend
;
rtx
funcend
;
rtx
insns
;
start_sequence
();
...
...
@@ -1771,8 +1823,8 @@ end_eh_unwinder (end)
ret_val
=
expand_builtin_return_addr
(
BUILT_IN_RETURN_ADDRESS
,
0
,
hard_frame_pointer_rtx
);
return_val_rtx
=
copy_to_reg
(
ret_val
);
#ifdef
NORMAL_
RETURN_ADDR_OFFSET
return_val_rtx
=
plus_constant
(
return_val_rtx
,
NORMAL_
RETURN_ADDR_OFFSET
-
1
);
#ifdef RETURN_ADDR_OFFSET
return_val_rtx
=
plus_constant
(
return_val_rtx
,
RETURN_ADDR_OFFSET
-
1
);
#else
return_val_rtx
=
plus_constant
(
return_val_rtx
,
-
1
);
#endif
...
...
@@ -1785,8 +1837,8 @@ end_eh_unwinder (end)
emit_move_insn
(
ret_val
,
gen_rtx
(
LABEL_REF
,
Pmode
,
label
));
#endif
#ifdef
NORMAL_
RETURN_ADDR_OFFSET
return_val_rtx
=
plus_constant
(
ret_val
,
-
NORMAL_
RETURN_ADDR_OFFSET
);
#ifdef RETURN_ADDR_OFFSET
return_val_rtx
=
plus_constant
(
ret_val
,
-
RETURN_ADDR_OFFSET
);
if
(
return_val_rtx
!=
ret_val
)
emit_move_insn
(
ret_val
,
return_val_rtx
);
#endif
...
...
gcc/cp/sig.c
View file @
21451173
...
...
@@ -571,6 +571,7 @@ build_signature_table_constructor (sig_ty, rhs)
delta
=
integer_zero_node
;
index
=
integer_zero_node
;
pfn
=
build_unary_op
(
ADDR_EXPR
,
rhs_method
,
0
);
TREE_SYMBOL_REFERENCED
(
DECL_ASSEMBLER_NAME
(
rhs_method
))
=
1
;
TREE_TYPE
(
pfn
)
=
ptr_type_node
;
TREE_ADDRESSABLE
(
rhs_method
)
=
1
;
offset_p
=
0
;
/* we can't offset the rhs sig table */
...
...
@@ -595,6 +596,7 @@ build_signature_table_constructor (sig_ty, rhs)
rhstype
,
1
));
index
=
integer_zero_node
;
pfn
=
build_unary_op
(
ADDR_EXPR
,
rhs_method
,
0
);
TREE_SYMBOL_REFERENCED
(
DECL_ASSEMBLER_NAME
(
rhs_method
))
=
1
;
TREE_TYPE
(
pfn
)
=
ptr_type_node
;
TREE_ADDRESSABLE
(
rhs_method
)
=
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment