diff options
author | Joern Rennecke <joern.rennecke@embecosm.com> | 2013-07-27 18:41:49 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2013-07-27 19:41:49 +0100 |
commit | 4c97f1cc9dd9543a266e4f258c811cb4577f4fc5 (patch) | |
tree | 6184d50bdd7084a886917534ac514a5e6a7f575b /gcc | |
parent | 9f1930bea87d274cefe24a19098e565c519ee464 (diff) | |
download | gcc-4c97f1cc9dd9543a266e4f258c811cb4577f4fc5.zip gcc-4c97f1cc9dd9543a266e4f258c811cb4577f4fc5.tar.gz gcc-4c97f1cc9dd9543a266e4f258c811cb4577f4fc5.tar.bz2 |
epiphany.c (epiphany_compute_frame_size): Also reserve space for saving UNKNOWN_REGNUM for leaf functions.
* config/epiphany/epiphany.c (epiphany_compute_frame_size):
Also reserve space for saving UNKNOWN_REGNUM for leaf functions.
From-SVN: r201287
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/epiphany/epiphany.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c3b52cd..db8db6f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-07-27 Joern Rennecke <joern.rennecke@embecosm.com> + + * config/epiphany/epiphany.c (epiphany_compute_frame_size): + Also reserve space for saving UNKNOWN_REGNUM for leaf functions. + 2013-07-26 Cary Coutant <ccoutant@google.com> * dwarf2out.c (die_checksum_ordered): Don't include template diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index 3b6f63a..1dcdc4b 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -884,6 +884,11 @@ struct epiphany_frame_info int stld_sz; /* Current load/store data size for offset adjustment. */ int need_fp; /* value to override "frame_pointer_needed */ + /* FIRST_SLOT is the slot that is saved first, at the very start of + the frame, with a POST_MODIFY to allocate the frame, if the size fits, + or at least the parm and register save areas, otherwise. + In the case of a large frame, LAST_SLOT is the slot that is saved last, + with a POST_MODIFY to allocate the rest of the frame. */ int first_slot, last_slot, first_slot_offset, last_slot_offset; int first_slot_size; int small_threshold; @@ -1069,7 +1074,10 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated. */) to be a lot of code complexity for little gain. */ || (reg_size > 8 && optimize)) reg_size = EPIPHANY_STACK_ALIGN (reg_size); - if (total_size + reg_size <= (unsigned) epiphany_stack_offset + if (((total_size + reg_size + /* Reserve space for UNKNOWN_REGNUM. */ + + EPIPHANY_STACK_ALIGN (4)) + <= (unsigned) epiphany_stack_offset) && !interrupt_p && crtl->is_leaf && !frame_pointer_needed) { @@ -1108,7 +1116,7 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated. */) if (total_size + reg_size <= (unsigned) epiphany_stack_offset) { gcc_assert (first_slot < 0); - gcc_assert (reg_size == 0); + gcc_assert (reg_size == 0 || reg_size == epiphany_stack_offset); last_slot_offset = EPIPHANY_STACK_ALIGN (total_size + reg_size); } else |