diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-05-06 13:44:29 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-05-06 13:44:29 -0400 |
commit | 15fc002672d643fd9d93d220027b5cd2aefc632c (patch) | |
tree | d7b5a1c9d8c9683d72283fd889f53d7255accaa7 /gcc/explow.c | |
parent | 1fd3ef7f65b9a12b392c889568cbcde92abe5f5b (diff) | |
download | gcc-15fc002672d643fd9d93d220027b5cd2aefc632c.zip gcc-15fc002672d643fd9d93d220027b5cd2aefc632c.tar.gz gcc-15fc002672d643fd9d93d220027b5cd2aefc632c.tar.bz2 |
(allocate_dynamic_stack_space): Just return virtual_stack_dynamic_rtx if asking for zero bytes.
(allocate_dynamic_stack_space): Just return virtual_stack_dynamic_rtx if
asking for zero bytes.
Set current_function_calls_alloca here and also record new stack level for
nonlocal gotos.
From-SVN: r7229
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index b047dff..7f1e196 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -915,6 +915,15 @@ allocate_dynamic_stack_space (size, target, known_align) rtx target; int known_align; { + /* If we're asking for zero bytes, it doesn't matter what we point + to since we can't derefference it. But return a reasonable + address anyway. */ + if (size == const0_rtx) + return virtual_stack_dynamic_rtx; + + /* Otherwise, show we're calling alloca or equivalent. */ + current_function_calls_alloca = 1; + /* Ensure the size is in the proper mode. */ if (GET_MODE (size) != VOIDmode && GET_MODE (size) != Pmode) size = convert_to_mode (Pmode, size, 1); @@ -1061,6 +1070,10 @@ allocate_dynamic_stack_space (size, target, known_align) emit_insn (gen_probe ()); #endif + /* Record the new stack level for nonlocal gotos. */ + if (nonlocal_goto_handler_slot != 0) + emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, NULL_RTX); + return target; } |