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
b001a02f
Commit
b001a02f
authored
Mar 01, 1995
by
Per Bothner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Feb 28's FUNCTION_NEEDS_STATIC_CHAIN changes.
From-SVN: r9106
parent
874a0744
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
21 deletions
+6
-21
gcc/expr.c
+1
-10
gcc/function.c
+4
-10
gcc/tree.c
+1
-1
No files found.
gcc/expr.c
View file @
b001a02f
...
@@ -4160,15 +4160,6 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -4160,15 +4160,6 @@ expand_expr (exp, target, tmode, modifier)
/* Mark as non-local and addressable. */
/* Mark as non-local and addressable. */
DECL_NONLOCAL
(
exp
)
=
1
;
DECL_NONLOCAL
(
exp
)
=
1
;
/* This is currently too late to be useful, since
init_function_start needs to know whether a static chain
is needed. However, it would be a useful optimization
if we could defer setting up static chains and trampolines
until we see that we actually need them due to references
to non-local non-static variables. */
FUNCTION_NEEDS_STATIC_CHAIN
(
current_function_decl
)
=
1
;
mark_addressable
(
exp
);
mark_addressable
(
exp
);
if
(
GET_CODE
(
DECL_RTL
(
exp
))
!=
MEM
)
if
(
GET_CODE
(
DECL_RTL
(
exp
))
!=
MEM
)
abort
();
abort
();
...
@@ -6199,7 +6190,7 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -6199,7 +6190,7 @@ expand_expr (exp, target, tmode, modifier)
/* Are we taking the address of a nested function? */
/* Are we taking the address of a nested function? */
if
(
TREE_CODE
(
TREE_OPERAND
(
exp
,
0
))
==
FUNCTION_DECL
if
(
TREE_CODE
(
TREE_OPERAND
(
exp
,
0
))
==
FUNCTION_DECL
&&
FUNCTION_NEEDS_STATIC_CHAIN
(
TREE_OPERAND
(
exp
,
0
))
)
&&
decl_function_context
(
TREE_OPERAND
(
exp
,
0
))
!=
0
)
{
{
op0
=
trampoline_address
(
TREE_OPERAND
(
exp
,
0
));
op0
=
trampoline_address
(
TREE_OPERAND
(
exp
,
0
));
op0
=
force_operand
(
op0
,
target
);
op0
=
force_operand
(
op0
,
target
);
...
...
gcc/function.c
View file @
b001a02f
...
@@ -4246,18 +4246,12 @@ rtx
...
@@ -4246,18 +4246,12 @@ rtx
lookup_static_chain
(
decl
)
lookup_static_chain
(
decl
)
tree
decl
;
tree
decl
;
{
{
tree
context
,
link
;
tree
context
=
decl_function_context
(
decl
);
tree
link
;
if
(
TREE_CODE
(
decl
)
==
FUNCTION_DECL
?
!
FUNCTION_NEEDS_STATIC_CHAIN
(
decl
)
:
!
FUNCTION_NEEDS_STATIC_CHAIN
(
current_function_decl
))
return
0
;
context
=
decl_function_context
(
decl
);
if
(
context
==
0
)
if
(
context
==
0
)
return
0
;
return
0
;
/* We treat inline_function_decl as an alias for the current function
/* We treat inline_function_decl as an alias for the current function
because that is the inline function whose vars, types, etc.
because that is the inline function whose vars, types, etc.
are being merged into the current function.
are being merged into the current function.
...
@@ -4713,7 +4707,7 @@ init_function_start (subr, filename, line)
...
@@ -4713,7 +4707,7 @@ init_function_start (subr, filename, line)
/* Nonzero if this is a nested function that uses a static chain. */
/* Nonzero if this is a nested function that uses a static chain. */
current_function_needs_context
current_function_needs_context
=
FUNCTION_NEEDS_STATIC_CHAIN
(
current_function_decl
);
=
(
decl_function_context
(
current_function_decl
)
!=
0
);
/* Set if a call to setjmp is seen. */
/* Set if a call to setjmp is seen. */
current_function_calls_setjmp
=
0
;
current_function_calls_setjmp
=
0
;
...
...
gcc/tree.c
View file @
b001a02f
...
@@ -1969,7 +1969,7 @@ staticp (arg)
...
@@ -1969,7 +1969,7 @@ staticp (arg)
case
FUNCTION_DECL
:
case
FUNCTION_DECL
:
/* Nested functions aren't static, since taking their address
/* Nested functions aren't static, since taking their address
involves a trampoline. */
involves a trampoline. */
return
!
FUNCTION_NEEDS_STATIC_CHAIN
(
arg
)
;
return
decl_function_context
(
arg
)
==
0
;
case
VAR_DECL
:
case
VAR_DECL
:
return
TREE_STATIC
(
arg
)
||
DECL_EXTERNAL
(
arg
);
return
TREE_STATIC
(
arg
)
||
DECL_EXTERNAL
(
arg
);
...
...
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