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
6d7306f7
Commit
6d7306f7
authored
Mar 26, 1996
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_function_start): Don't set up context_display
unless current_function_needs_context. From-SVN: r11615
parent
65d8b1ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
34 deletions
+38
-34
gcc/function.c
+38
-34
No files found.
gcc/function.c
View file @
6d7306f7
...
@@ -5230,48 +5230,52 @@ expand_function_start (subr, parms_have_cleanups)
...
@@ -5230,48 +5230,52 @@ expand_function_start (subr, parms_have_cleanups)
use_variable
(
current_function_internal_arg_pointer
);
use_variable
(
current_function_internal_arg_pointer
);
}
}
/* Fetch static chain values for containing functions. */
context_display
=
0
;
tem
=
decl_function_context
(
current_function_decl
);
if
(
current_function_needs_context
)
/* If not doing stupid register allocation copy the static chain
pointer into a pseudo. If we have small register classes, copy the
value from memory if static_chain_incoming_rtx is a REG. If we do
stupid register allocation, we use the stack address generated above. */
if
(
tem
&&
!
obey_regdecls
)
{
{
/* Fetch static chain values for containing functions. */
tem
=
decl_function_context
(
current_function_decl
);
/* If not doing stupid register allocation copy the static chain
pointer into a pseudo. If we have small register classes, copy
the value from memory if static_chain_incoming_rtx is a REG. If
we do stupid register allocation, we use the stack address
generated above. */
if
(
tem
&&
!
obey_regdecls
)
{
#ifdef SMALL_REGISTER_CLASSES
#ifdef SMALL_REGISTER_CLASSES
/* If the static chain originally came in a register, put it back
/* If the static chain originally came in a register, put it back
there, then move it out in the next insn. The reason for
there, then move it out in the next insn. The reason for
this peculiar code is to satisfy function integration. */
this peculiar code is to satisfy function integration. */
if
(
GET_CODE
(
static_chain_incoming_rtx
)
==
REG
)
if
(
GET_CODE
(
static_chain_incoming_rtx
)
==
REG
)
emit_move_insn
(
static_chain_incoming_rtx
,
last_ptr
);
emit_move_insn
(
static_chain_incoming_rtx
,
last_ptr
);
#endif
#endif
last_ptr
=
copy_to_reg
(
static_chain_incoming_rtx
);
last_ptr
=
copy_to_reg
(
static_chain_incoming_rtx
);
}
}
context_display
=
0
;
while
(
tem
)
while
(
tem
)
{
{
tree
rtlexp
=
make_node
(
RTL_EXPR
);
tree
rtlexp
=
make_node
(
RTL_EXPR
);
RTL_EXPR_RTL
(
rtlexp
)
=
last_ptr
;
RTL_EXPR_RTL
(
rtlexp
)
=
last_ptr
;
context_display
=
tree_cons
(
tem
,
rtlexp
,
context_display
);
context_display
=
tree_cons
(
tem
,
rtlexp
,
context_display
);
tem
=
decl_function_context
(
tem
);
tem
=
decl_function_context
(
tem
);
if
(
tem
==
0
)
if
(
tem
==
0
)
break
;
break
;
/* Chain thru stack frames, assuming pointer to next lexical frame
/* Chain thru stack frames, assuming pointer to next lexical frame
is found at the place we always store it. */
is found at the place we always store it. */
#ifdef FRAME_GROWS_DOWNWARD
#ifdef FRAME_GROWS_DOWNWARD
last_ptr
=
plus_constant
(
last_ptr
,
-
GET_MODE_SIZE
(
Pmode
));
last_ptr
=
plus_constant
(
last_ptr
,
-
GET_MODE_SIZE
(
Pmode
));
#endif
#endif
last_ptr
=
copy_to_reg
(
gen_rtx
(
MEM
,
Pmode
,
last_ptr
=
copy_to_reg
(
gen_rtx
(
MEM
,
Pmode
,
memory_address
(
Pmode
,
last_ptr
)));
memory_address
(
Pmode
,
last_ptr
)));
/* If we are not optimizing, ensure that we know that this
/* If we are not optimizing, ensure that we know that this
piece of context is live over the entire function. */
piece of context is live over the entire function. */
if
(
!
optimize
)
if
(
!
optimize
)
save_expr_regs
=
gen_rtx
(
EXPR_LIST
,
VOIDmode
,
last_ptr
,
save_expr_regs
=
gen_rtx
(
EXPR_LIST
,
VOIDmode
,
last_ptr
,
save_expr_regs
);
save_expr_regs
);
}
}
}
/* After the display initializations is where the tail-recursion label
/* After the display initializations is where the tail-recursion label
...
...
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