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
173cd503
Commit
173cd503
authored
Apr 24, 1997
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
From-SVN: r13974
parent
4c742813
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
8 deletions
+25
-8
gcc/calls.c
+12
-8
gcc/flags.h
+4
-0
gcc/function.c
+8
-0
gcc/function.h
+1
-0
No files found.
gcc/calls.c
View file @
173cd503
...
@@ -1025,14 +1025,19 @@ expand_call (exp, target, ignore)
...
@@ -1025,14 +1025,19 @@ expand_call (exp, target, ignore)
#endif
#endif
)
)
{
{
/* If we're compiling a thunk, pass through invisible
references instead of making a copy. */
if
(
current_function_is_thunk
#ifdef FUNCTION_ARG_CALLEE_COPIES
#ifdef FUNCTION_ARG_CALLEE_COPIES
if
(
FUNCTION_ARG_CALLEE_COPIES
(
args_so_far
,
TYPE_MODE
(
type
),
type
,
||
(
FUNCTION_ARG_CALLEE_COPIES
(
args_so_far
,
TYPE_MODE
(
type
),
argpos
<
n_named_args
)
type
,
argpos
<
n_named_args
)
/* If it's in a register, we must make a copy of it too. */
/* If it's in a register, we must make a copy of it too. */
/* ??? Is this a sufficient test? Is there a better one? */
/* ??? Is this a sufficient test? Is there a better one? */
&&
!
(
TREE_CODE
(
args
[
i
].
tree_value
)
==
VAR_DECL
&&
!
(
TREE_CODE
(
args
[
i
].
tree_value
)
==
VAR_DECL
&&
REG_P
(
DECL_RTL
(
args
[
i
].
tree_value
)))
&&
REG_P
(
DECL_RTL
(
args
[
i
].
tree_value
)))
&&
!
TREE_ADDRESSABLE
(
type
))
&&
!
TREE_ADDRESSABLE
(
type
))
#endif
)
{
{
args
[
i
].
tree_value
=
build1
(
ADDR_EXPR
,
args
[
i
].
tree_value
=
build1
(
ADDR_EXPR
,
build_pointer_type
(
type
),
build_pointer_type
(
type
),
...
@@ -1040,7 +1045,6 @@ expand_call (exp, target, ignore)
...
@@ -1040,7 +1045,6 @@ expand_call (exp, target, ignore)
type
=
build_pointer_type
(
type
);
type
=
build_pointer_type
(
type
);
}
}
else
else
#endif
{
{
/* We make a copy of the object and pass the address to the
/* We make a copy of the object and pass the address to the
function being called. */
function being called. */
...
...
gcc/flags.h
View file @
173cd503
...
@@ -392,3 +392,7 @@ extern int current_function_has_nonlocal_label;
...
@@ -392,3 +392,7 @@ extern int current_function_has_nonlocal_label;
function. */
function. */
extern
int
current_function_has_nonlocal_goto
;
extern
int
current_function_has_nonlocal_goto
;
/* Nonzero if the current function is a thunk, so we should try to cut
corners where we can. */
int
current_function_is_thunk
;
gcc/function.c
View file @
173cd503
...
@@ -132,6 +132,11 @@ int current_function_has_nonlocal_goto;
...
@@ -132,6 +132,11 @@ int current_function_has_nonlocal_goto;
int
current_function_contains_functions
;
int
current_function_contains_functions
;
/* Nonzero if the current function is a thunk (a lightweight function that
just adjusts one of its arguments and forwards to another function), so
we should try to cut corners where we can. */
int
current_function_is_thunk
;
/* Nonzero if function being compiled can call alloca,
/* Nonzero if function being compiled can call alloca,
either as a subroutine or builtin. */
either as a subroutine or builtin. */
...
@@ -489,6 +494,7 @@ push_function_context_to (context)
...
@@ -489,6 +494,7 @@ push_function_context_to (context)
p
->
has_nonlocal_label
=
current_function_has_nonlocal_label
;
p
->
has_nonlocal_label
=
current_function_has_nonlocal_label
;
p
->
has_nonlocal_goto
=
current_function_has_nonlocal_goto
;
p
->
has_nonlocal_goto
=
current_function_has_nonlocal_goto
;
p
->
contains_functions
=
current_function_contains_functions
;
p
->
contains_functions
=
current_function_contains_functions
;
p
->
is_thunk
=
current_function_is_thunk
;
p
->
args_size
=
current_function_args_size
;
p
->
args_size
=
current_function_args_size
;
p
->
pretend_args_size
=
current_function_pretend_args_size
;
p
->
pretend_args_size
=
current_function_pretend_args_size
;
p
->
arg_offset_rtx
=
current_function_arg_offset_rtx
;
p
->
arg_offset_rtx
=
current_function_arg_offset_rtx
;
...
@@ -568,6 +574,7 @@ pop_function_context_from (context)
...
@@ -568,6 +574,7 @@ pop_function_context_from (context)
current_function_calls_alloca
=
p
->
calls_alloca
;
current_function_calls_alloca
=
p
->
calls_alloca
;
current_function_has_nonlocal_label
=
p
->
has_nonlocal_label
;
current_function_has_nonlocal_label
=
p
->
has_nonlocal_label
;
current_function_has_nonlocal_goto
=
p
->
has_nonlocal_goto
;
current_function_has_nonlocal_goto
=
p
->
has_nonlocal_goto
;
current_function_is_thunk
=
p
->
is_thunk
;
current_function_args_size
=
p
->
args_size
;
current_function_args_size
=
p
->
args_size
;
current_function_pretend_args_size
=
p
->
pretend_args_size
;
current_function_pretend_args_size
=
p
->
pretend_args_size
;
current_function_arg_offset_rtx
=
p
->
arg_offset_rtx
;
current_function_arg_offset_rtx
=
p
->
arg_offset_rtx
;
...
@@ -4971,6 +4978,7 @@ init_function_start (subr, filename, line)
...
@@ -4971,6 +4978,7 @@ init_function_start (subr, filename, line)
current_function_has_nonlocal_label
=
0
;
current_function_has_nonlocal_label
=
0
;
current_function_has_nonlocal_goto
=
0
;
current_function_has_nonlocal_goto
=
0
;
current_function_contains_functions
=
0
;
current_function_contains_functions
=
0
;
current_function_is_thunk
=
0
;
current_function_returns_pcc_struct
=
0
;
current_function_returns_pcc_struct
=
0
;
current_function_returns_struct
=
0
;
current_function_returns_struct
=
0
;
...
...
gcc/function.h
View file @
173cd503
...
@@ -78,6 +78,7 @@ struct function
...
@@ -78,6 +78,7 @@ struct function
int
has_nonlocal_label
;
int
has_nonlocal_label
;
int
has_nonlocal_goto
;
int
has_nonlocal_goto
;
int
contains_functions
;
int
contains_functions
;
int
is_thunk
;
rtx
nonlocal_goto_handler_slot
;
rtx
nonlocal_goto_handler_slot
;
rtx
nonlocal_goto_stack_level
;
rtx
nonlocal_goto_stack_level
;
tree
nonlocal_labels
;
tree
nonlocal_labels
;
...
...
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