re PR target/7044 (vax casesi breakage)
PR target/7044 * config/aarch64/aarch64.c (aarch64_override_options_after_change_1): When forcing flag_omit_frame_pointer to be true, use a special value that can be detected if this function is called again, thus preventing flag_omit_leaf_frame_pointer from being forced to be false. * gcc.target/aarch64/pr70044.c: New test. From-SVN: r234118
This commit is contained in:
parent
b87a8d7de7
commit
a3dc87600f
4 changed files with 44 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
2016-03-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR target/7044
|
||||
* config/aarch64/aarch64.c
|
||||
(aarch64_override_options_after_change_1): When forcing
|
||||
flag_omit_frame_pointer to be true, use a special value that can
|
||||
be detected if this function is called again, thus preventing
|
||||
flag_omit_leaf_frame_pointer from being forced to be false.
|
||||
|
||||
2016-03-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
* common/config/aarch64/aarch64-common.c (aarch64_handle_option):
|
||||
|
|
|
@ -8110,10 +8110,25 @@ aarch64_parse_override_string (const char* input_string,
|
|||
static void
|
||||
aarch64_override_options_after_change_1 (struct gcc_options *opts)
|
||||
{
|
||||
/* The logic here is that if we are disabling all frame pointer generation
|
||||
then we do not need to disable leaf frame pointer generation as a
|
||||
separate operation. But if we are *only* disabling leaf frame pointer
|
||||
generation then we set flag_omit_frame_pointer to true, but in
|
||||
aarch64_frame_pointer_required we return false only for leaf functions.
|
||||
|
||||
PR 70044: We have to be careful about being called multiple times for the
|
||||
same function. Once we have decided to set flag_omit_frame_pointer just
|
||||
so that we can omit leaf frame pointers, we must then not interpret a
|
||||
second call as meaning that all frame pointer generation should be
|
||||
omitted. We do this by setting flag_omit_frame_pointer to a special,
|
||||
non-zero value. */
|
||||
if (opts->x_flag_omit_frame_pointer == 2)
|
||||
opts->x_flag_omit_frame_pointer = 0;
|
||||
|
||||
if (opts->x_flag_omit_frame_pointer)
|
||||
opts->x_flag_omit_leaf_frame_pointer = false;
|
||||
else if (opts->x_flag_omit_leaf_frame_pointer)
|
||||
opts->x_flag_omit_frame_pointer = true;
|
||||
opts->x_flag_omit_frame_pointer = 2;
|
||||
|
||||
/* If not optimizing for size, set the default
|
||||
alignment to what the target wants. */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2016-03-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR target/70044
|
||||
* gcc.target/aarch64/pr70044.c: New test.
|
||||
|
||||
2016-03-10 Patrick Palka <ppalka@gcc.gnu.org>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
|
|
14
gcc/testsuite/gcc.target/aarch64/pr70044.c
Normal file
14
gcc/testsuite/gcc.target/aarch64/pr70044.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* { dg-do link } */
|
||||
/* { dg-require-effective-target lto } */
|
||||
/* { dg-options "-flto -O --save-temps -fno-omit-frame-pointer" } */
|
||||
|
||||
extern int atoi (const char *);
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
return atoi (argv[0]) + 1;
|
||||
}
|
||||
|
||||
/* Check that the frame pointer really is created. */
|
||||
/* { dg-final { scan-lto-assembler "add x29, sp," } } */
|
Loading…
Add table
Reference in a new issue