summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-25 21:56:54 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-25 21:56:54 +0000
commitbfebd01ce935f35c7c6d5072dc340fedec9b3199 (patch)
tree3ee320e66a76e12536715c4ad5ede80409517f64
parentc7ecab0679b1e1a29b864f67351626689e12136f (diff)
downloadppe42-gcc-bfebd01ce935f35c7c6d5072dc340fedec9b3199.tar.gz
ppe42-gcc-bfebd01ce935f35c7c6d5072dc340fedec9b3199.zip
* config/i386/i386.c (ix86_expand_epilogue): Properly compute size
of registers to restore along non eh_return path. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41555 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 323dc838d19..7e58efaeb56 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-25 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.c (ix86_expand_epilogue): Properly compute size
+ of registers to restore along non eh_return path.
+
2001-04-25 Jakub Jelinek <jakub@redhat.com>
* c-format.c (check_format_info_recurse): Handle
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 5e5b5a56d78..a0e40ba309e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2591,8 +2591,14 @@ ix86_expand_epilogue (style)
ix86_compute_frame_layout (&frame);
- /* Calculate start of saved registers relative to ebp. */
- offset = -frame.nregs * UNITS_PER_WORD;
+ /* Calculate start of saved registers relative to ebp. Special care
+ must be taken for the normal return case of a function using
+ eh_return: the eax and edx registers are marked as saved, but not
+ restored along this path. */
+ offset = frame.nregs;
+ if (current_function_calls_eh_return && style != 2)
+ offset -= 2;
+ offset *= -UNITS_PER_WORD;
#ifdef FUNCTION_BLOCK_PROFILER_EXIT
if (profile_block_flag == 2)
OpenPOWER on IntegriCloud