mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
arm.c (arm_get_frame_offsets): Set offsets->locals_base to avoid negative stack size.
gcc/ChangeLog: 2007-06-28 Seongbae Park <seongbae.park@gmail.com> * config/arm/arm.c (arm_get_frame_offsets): Set offsets->locals_base to avoid negative stack size. (thumb_expand_prologue): Assert on negative stack size. gcc/testsuite/ChangeLog: 2007-06-28 Seongbae Park <seongbae.park@gmail.com> * gcc.target/arm/stack-corruption.c: New test. From-SVN: r126095
This commit is contained in:
committed by
Seongbae Park
parent
431e37c238
commit
7b9b2d2152
@@ -1,3 +1,9 @@
|
||||
2007-06-28 Seongbae Park <seongbae.park@gmail.com>
|
||||
|
||||
* config/arm/arm.c (arm_get_frame_offsets): Set
|
||||
offsets->locals_base to avoid negative stack size.
|
||||
(thumb_expand_prologue): Assert on negative stack size.
|
||||
|
||||
2007-06-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure
|
||||
|
||||
@@ -10555,6 +10555,7 @@ arm_get_frame_offsets (void)
|
||||
if (leaf && frame_size == 0)
|
||||
{
|
||||
offsets->outgoing_args = offsets->soft_frame;
|
||||
offsets->locals_base = offsets->soft_frame;
|
||||
return offsets;
|
||||
}
|
||||
|
||||
@@ -13874,6 +13875,7 @@ thumb_expand_epilogue (void)
|
||||
amount = offsets->locals_base - offsets->saved_regs;
|
||||
}
|
||||
|
||||
gcc_assert (amount >= 0);
|
||||
if (amount)
|
||||
{
|
||||
if (amount < 512)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2007-06-28 Seongbae Park <seongbae.park@gmail.com>
|
||||
|
||||
* gcc.target/arm/stack-corruption.c: New test.
|
||||
|
||||
2007-06-27 Simon Martin <simartin@users.sourceforge.net>
|
||||
|
||||
PR c++/27492
|
||||
|
||||
8
gcc/testsuite/gcc.target/arm/stack-corruption.c
Normal file
8
gcc/testsuite/gcc.target/arm/stack-corruption.c
Normal file
@@ -0,0 +1,8 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -mthumb -fno-omit-frame-pointer" } */
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-not "\tadd\tr7, sp, #8\n" } } */
|
||||
Reference in New Issue
Block a user