re PR target/68701 ("gcc -m32 -finstrument-functions -ffixed-ebp" produces internal compiler error)
PR target/68701 * config/i386/i386.c (ix86_option_override_internal): Enable -maccumulate-outgoing-args when %ebp is fixed due to stack realignment requirements. testsuite/ChangeLog: PR target/68701 * testsuite/gcc.target/i386/pr68701-1.c: New test. * testsuite/gcc.target/i386/pr68701-2.c: Ditto. From-SVN: r231419
This commit is contained in:
parent
0b8d93e55f
commit
9e5d0977ff
@ -1,3 +1,10 @@
|
||||
2015-12-08 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/68701
|
||||
* config/i386/i386.c (ix86_option_override_internal): Enable
|
||||
-maccumulate-outgoing-args when %ebp is fixed due to stack
|
||||
realignment requirements.
|
||||
|
||||
2015-12-08 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR tree-optimization/68640
|
||||
|
@ -5296,6 +5296,17 @@ ix86_option_override_internal (bool main_args_p,
|
||||
opts->x_target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
|
||||
}
|
||||
|
||||
/* Stack realignment without -maccumulate-outgoing-args requires %ebp,
|
||||
so enable -maccumulate-outgoing-args when %ebp is fixed. */
|
||||
if (fixed_regs[BP_REG]
|
||||
&& !(opts->x_target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
|
||||
{
|
||||
if (opts_set->x_target_flags & MASK_ACCUMULATE_OUTGOING_ARGS)
|
||||
warning (0, "fixed ebp register requires %saccumulate-outgoing-args%s",
|
||||
prefix, suffix);
|
||||
opts->x_target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
|
||||
}
|
||||
|
||||
/* Figure out what ASM_GENERATE_INTERNAL_LABEL builds as a prefix. */
|
||||
{
|
||||
char *p;
|
||||
|
@ -1,3 +1,9 @@
|
||||
2015-12-08 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/68701
|
||||
* testsuite/gcc.target/i386/pr68701-1.c: New test.
|
||||
* testsuite/gcc.target/i386/pr68701-2.c: Ditto.
|
||||
|
||||
2015-12-08 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.target/i386/sse4_1-round.h (do_round): Fix inline asm statements.
|
||||
|
13
gcc/testsuite/gcc.target/i386/pr68701-1.c
Normal file
13
gcc/testsuite/gcc.target/i386/pr68701-1.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -ffixed-ebp -mno-accumulate-outgoing-args" } */
|
||||
|
||||
/* { dg-warning "fixed ebp register requires" "" { target *-*-* } 0 } */
|
||||
|
||||
void foo (void);
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
foo ();
|
||||
return argc - 1;
|
||||
}
|
11
gcc/testsuite/gcc.target/i386/pr68701-2.c
Normal file
11
gcc/testsuite/gcc.target/i386/pr68701-2.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -ffixed-ebp -mno-accumulate-outgoing-args -mstackrealign -msse" } */
|
||||
|
||||
/* { dg-warning "fixed ebp register requires" "" { target *-*-* } 0 } */
|
||||
|
||||
typedef float V __attribute__((vector_size(16)));
|
||||
|
||||
void bar (V a)
|
||||
{
|
||||
volatile V b = a;
|
||||
}
|
Loading…
Reference in New Issue
Block a user