diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-15 20:09:24 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-15 20:09:24 +0000 |
commit | aa3a9d055f9045b62bf0c0fa1b2981f26f077a40 (patch) | |
tree | 1e0d050185c2cceb6014af72b8d7ee70ed873f48 | |
parent | 1837e9667fdb3b731f643b267ad91ab0f0805ba1 (diff) | |
download | gcc-aa3a9d055f9045b62bf0c0fa1b2981f26f077a40.tar.gz |
PR debug/46095
* config/i386/i386.c (pro_epilogue_adjust_stack): Instead of
marking r11 set RTX_FRAME_RELATED_P if offset is too large for
style < 0, add REG_FRAME_RELATED_EXPR.
* gcc.target/i386/pr46095.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166767 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr46095.c | 12 |
4 files changed, 31 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc7c8d10acd..b0cd604822a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2010-11-15 Jakub Jelinek <jakub@redhat.com> + PR debug/46095 + * config/i386/i386.c (pro_epilogue_adjust_stack): Instead of + marking r11 set RTX_FRAME_RELATED_P if offset is too large for + style < 0, add REG_FRAME_RELATED_EXPR. + PR debug/46387 * rtl.h (vt_equate_reg_base_value): New prototype. * alias.c (vt_equate_reg_base_value): New function. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 15e8b271b9d..f7cd0faccb8 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -9418,6 +9418,7 @@ pro_epilogue_adjust_stack (rtx dest, rtx src, rtx offset, { struct machine_function *m = cfun->machine; rtx insn; + bool add_frame_related_expr = false; if (! TARGET_64BIT) insn = gen_pro_epilogue_adjust_stack_si_add (dest, src, offset); @@ -9438,7 +9439,7 @@ pro_epilogue_adjust_stack (rtx dest, rtx src, rtx offset, } insn = emit_insn (gen_rtx_SET (DImode, tmp, offset)); if (style < 0) - RTX_FRAME_RELATED_P (insn) = 1; + add_frame_related_expr = true; insn = gen_pro_epilogue_adjust_stack_di_add (dest, src, tmp); } @@ -9461,7 +9462,15 @@ pro_epilogue_adjust_stack (rtx dest, rtx src, rtx offset, RTX_FRAME_RELATED_P (insn) = 1; } else if (style < 0) - RTX_FRAME_RELATED_P (insn) = 1; + { + RTX_FRAME_RELATED_P (insn) = 1; + if (add_frame_related_expr) + { + rtx r = gen_rtx_PLUS (Pmode, src, offset); + r = gen_rtx_SET (VOIDmode, dest, r); + add_reg_note (insn, REG_FRAME_RELATED_EXPR, r); + } + } if (dest == stack_pointer_rtx) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5b8a56e08b0..00f541844be 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2010-11-15 Jakub Jelinek <jakub@redhat.com> + PR debug/46095 + * gcc.target/i386/pr46095.c: New test. + PR debug/46387 * gcc.dg/pr46387.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr46095.c b/gcc/testsuite/gcc.target/i386/pr46095.c new file mode 100644 index 00000000000..ab9501e7818 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr46095.c @@ -0,0 +1,12 @@ +/* PR debug/46095 */ +/* { dg-do compile { target lp64 } } */ +/* { dg-options "-O -fschedule-insns2 -fno-omit-frame-pointer -fstack-protector" } */ + +extern void bar (char *); + +void +foo (void) +{ + char c[0x80000000UL]; + bar (c); +} |