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
0e668396
Commit
0e668396
authored
Jan 08, 2000
by
Nick Clifton
Committed by
Nick Clifton
Jan 08, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug restoring stack from interrupt handler.
From-SVN: r31287
parent
69d4f56d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
gcc/ChangeLog
+5
-0
gcc/config/v850/v850.c
+14
-12
No files found.
gcc/ChangeLog
View file @
0e668396
Sat
Jan
8
12
:
12
:
46
2000
Nick
Clifton
<
nickc
@cygnus
.
com
>
*
config
/
v850
/
v850
.
c
(
expand_epilogue
)
:
Interrupt
functions
no
longer
allocate
extra
stack
for
function
calls
.
2000
-
01
-
08
Michael
Hayes
<
m
.
hayes
@elec
.
canterbury
.
ac
.
nz
>
*
config
/
c4x
/
c4x
.
md
(
*
subqf3_set
)
:
Fix
typo
.
...
...
gcc/config/v850/v850.c
View file @
0e668396
...
...
@@ -1495,7 +1495,7 @@ expand_prologue ()
actual_fsize
=
compute_frame_size
(
size
,
&
reg_saved
);
/* Save/setup global registers for interrupt functions right now */
/* Save/setup global registers for interrupt functions right now
.
*/
if
(
interrupt_handler
)
{
emit_insn
(
gen_save_interrupt
());
...
...
@@ -1527,7 +1527,7 @@ expand_prologue ()
}
}
/* Identify all of the saved registers */
/* Identify all of the saved registers
.
*/
num_save
=
0
;
default_stack
=
0
;
for
(
i
=
1
;
i
<
31
;
i
++
)
...
...
@@ -1716,7 +1716,7 @@ expand_epilogue ()
if
(
frame_pointer_needed
)
emit_move_insn
(
stack_pointer_rtx
,
hard_frame_pointer_rtx
);
/* Identify all of the saved registers */
/* Identify all of the saved registers
.
*/
num_restore
=
0
;
default_stack
=
0
;
for
(
i
=
1
;
i
<
31
;
i
++
)
...
...
@@ -1736,7 +1736,9 @@ expand_epilogue ()
/* See if we have an insn that restores the particular registers we
want to. */
restore_all
=
NULL_RTX
;
if
(
TARGET_PROLOG_FUNCTION
&&
num_restore
>
0
if
(
TARGET_PROLOG_FUNCTION
&&
num_restore
>
0
&&
actual_fsize
>=
default_stack
&&
!
interrupt_handler
)
{
...
...
@@ -1748,7 +1750,7 @@ expand_epilogue ()
if
(
unalloc_stack
)
restore_func_len
+=
CONST_OK_FOR_J
(
unalloc_stack
)
?
2
:
4
;
/*
see if we would have used ep to restore the registers
*/
/*
See if we would have used ep to restore the registers.
*/
if
(
TARGET_EP
&&
num_restore
>
3
&&
(
unsigned
)
actual_fsize
<
255
)
restore_normal_len
=
(
3
*
2
)
+
(
2
*
num_restore
);
else
...
...
@@ -1781,6 +1783,7 @@ expand_epilogue ()
}
code
=
recog
(
restore_all
,
NULL_RTX
,
NULL_PTR
);
if
(
code
>=
0
)
{
rtx
insn
;
...
...
@@ -1818,7 +1821,7 @@ Saved %d bytes via epilogue function (%d vs. %d) in function %s\n",
}
/* If no epilog save function is available, restore the registers the
old fashioned way (one by one). */
old fashioned way (one by one).
*/
if
(
!
restore_all
)
{
/* If the stack is large, we need to cut it down in 2 pieces. */
...
...
@@ -1827,15 +1830,13 @@ Saved %d bytes via epilogue function (%d vs. %d) in function %s\n",
else
init_stack_free
=
actual_fsize
;
/* Deallocate the rest of the stack if it is > 32K or if extra stack
was allocated for an interrupt handler that makes a call. */
if
(
actual_fsize
>
init_stack_free
||
(
interrupt_handler
&&
actual_fsize
))
/* Deallocate the rest of the stack if it is > 32K. */
if
(
actual_fsize
>
init_stack_free
)
{
int
diff
;
diff
=
actual_fsize
-
((
interrupt_handler
)
?
0
:
init_stack_free
);
if
(
CONST_OK_FOR_K
(
diff
))
emit_insn
(
gen_addsi3
(
stack_pointer_rtx
,
stack_pointer_rtx
,
...
...
@@ -1858,7 +1859,7 @@ Saved %d bytes via epilogue function (%d vs. %d) in function %s\n",
}
else
{
/* Restore registers from the beginning of the stack frame */
/* Restore registers from the beginning of the stack frame
.
*/
offset
=
init_stack_free
-
4
;
/* Restore the return pointer first. */
...
...
@@ -1879,6 +1880,7 @@ Saved %d bytes via epilogue function (%d vs. %d) in function %s\n",
plus_constant
(
stack_pointer_rtx
,
offset
)));
emit_insn
(
gen_rtx_USE
(
VOIDmode
,
restore_regs
[
i
]));
offset
-=
4
;
}
...
...
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