On Sun, Jul 9, 2017 at 9:06 PM, H.J. Lu <hjl.to...@gmail.com> wrote:

>>> PR target/81313
>>> * gcc.dg/stack-layout-dynamic-1.c (dg-options): Add -mregparm=3
>>> for ia32.
>>> Don't expect cfi_escape and expect cfi_def_cfa_register on x86.
>>>
>>> OK for trunk?
>>
>> Better use something like:
>>
>> --cut here--
>> Index: stack-layout-dynamic-1.c
>> ===================================================================
>> --- stack-layout-dynamic-1.c    (revision 250084)
>> +++ stack-layout-dynamic-1.c    (working copy)
>> @@ -4,12 +4,12 @@
>>  /* { dg-options "-O0 -fomit-frame-pointer" } */
>>  /* { dg-require-effective-target ptr32plus } */
>>
>> -extern void bar (void *, void *, void *);
>> +extern void bar (void *,void *, void *, void *, void *, void *, void *);
>>  void foo (void)
>>  {
>> -  int i;
>> +  int i, j, k, l, m;
>>    __attribute__ ((aligned(65536))) char runtime_aligned_1[512];
>>    __attribute__ ((aligned(32768))) char runtime_aligned_2[1024];
>> -  bar (&i, &runtime_aligned_1, &runtime_aligned_2);
>> +  bar (&i, &j, &k, &l, &m, &runtime_aligned_1, &runtime_aligned_2);
>>  }
>>  /* { dg-final { scan-assembler-not "cfi_def_cfa_register" } } */
>> --cut here--
>>
>> so the testcase will suppress new optimization and test what it was
>> intended to test also on x86_64.
>
> I will give it a try.
>
> BTW,  gcc.target/i386/pr59501-3a.c will fail the same way as
> gcc.target/i386/pr59501-4a.c now since -mno-accumulate-outgoing-arg
> works the same as  -maccumulate-outgoing-args.  A patch is posted at:
>
> https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00400.html
>
> to fix it.

The referred patch enhances Jakubs PR 59501 patch, I'll wait for his
comments on your patch.

Uros.

Reply via email to