public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
@ 2014-09-04  7:42 Venkataramanan Kumar
  2014-09-04  8:19 ` James Greenhalgh
  0 siblings, 1 reply; 20+ messages in thread
From: Venkataramanan Kumar @ 2014-09-04  7:42 UTC (permalink / raw)
  To: Marcus Shawcroft, gcc-patches, Patch Tracking, Richard Earnshaw

Hi maintainers,

I just added "=r" and retested it.

gcc/ChangeLog

2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>

       * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
       constraint for operand 0.

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index b5be79c..ed6e602 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -4026,7 +4026,7 @@
 })

 (define_insn "stack_protect_test_<mode>"
-  [(set (match_operand:PTR 0 "register_operand")
+  [(set (match_operand:PTR 0 "register_operand" "=r")
        (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
                     (match_operand:PTR 2 "memory_operand" "m")]
         UNSPEC_SP_TEST))

regards,
venkat.

On 4 September 2014 12:42, Venkataramanan Kumar
<venkataramanan.kumar@linaro.org> wrote:
> Hi Maintainers,
>
> Below patch adds register constraint "r" for destination operand in
> "stack_protect_test" pattern.
>
> We need a general register here and adding "r" will avoid vector
> register getting allocated.
>
> regression tested on aarch64-unknown-linux-gnu.
>
> Ok for trunk?
>
> regards,
> Venkat.
>
>
> gcc/ChangeLog
>
> 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>
>        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>        constraint for operand 0.
>
>
> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
> index b5be79c..77588b9 100644
> --- a/gcc/config/aarch64/aarch64.md
> +++ b/gcc/config/aarch64/aarch64.md
> @@ -4026,7 +4026,7 @@
>  })
>
>  (define_insn "stack_protect_test_<mode>"
> -  [(set (match_operand:PTR 0 "register_operand")
> + [(set (match_operand:PTR 0 "register_operand" "r")
>         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
>                      (match_operand:PTR 2 "memory_operand" "m")]
>          UNSPEC_SP_TEST))

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-04  7:42 [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern Venkataramanan Kumar
@ 2014-09-04  8:19 ` James Greenhalgh
  2014-09-04 18:20   ` Venkataramanan Kumar
  2014-09-16 21:36   ` Andrew Pinski
  0 siblings, 2 replies; 20+ messages in thread
From: James Greenhalgh @ 2014-09-04  8:19 UTC (permalink / raw)
  To: Venkataramanan Kumar
  Cc: Marcus Shawcroft, gcc-patches, Patch Tracking, Richard Earnshaw

On Thu, Sep 04, 2014 at 08:42:31AM +0100, Venkataramanan Kumar wrote:
> Hi maintainers,
> 
> I just added "=r" and retested it.

I had a very similar patch to this sitting in my local tree. However,
I am surprised you have left operand 3 as an output operand. In my tree
I had marked operand 3 as "&r".

What do you think?

Thanks,
James

> gcc/ChangeLog
> 
> 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
> 
>        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>        constraint for operand 0.
> 
> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
> index b5be79c..ed6e602 100644
> --- a/gcc/config/aarch64/aarch64.md
> +++ b/gcc/config/aarch64/aarch64.md
> @@ -4026,7 +4026,7 @@
>  })
> 
>  (define_insn "stack_protect_test_<mode>"
> -  [(set (match_operand:PTR 0 "register_operand")
> +  [(set (match_operand:PTR 0 "register_operand" "=r")
>         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
>                      (match_operand:PTR 2 "memory_operand" "m")]
>          UNSPEC_SP_TEST))
> 
> regards,
> venkat.
> 
> On 4 September 2014 12:42, Venkataramanan Kumar
> <venkataramanan.kumar@linaro.org> wrote:
> > Hi Maintainers,
> >
> > Below patch adds register constraint "r" for destination operand in
> > "stack_protect_test" pattern.
> >
> > We need a general register here and adding "r" will avoid vector
> > register getting allocated.
> >
> > regression tested on aarch64-unknown-linux-gnu.
> >
> > Ok for trunk?
> >
> > regards,
> > Venkat.
> >
> >
> > gcc/ChangeLog
> >
> > 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
> >
> >        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
> >        constraint for operand 0.
> >
> >
> > diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
> > index b5be79c..77588b9 100644
> > --- a/gcc/config/aarch64/aarch64.md
> > +++ b/gcc/config/aarch64/aarch64.md
> > @@ -4026,7 +4026,7 @@
> >  })
> >
> >  (define_insn "stack_protect_test_<mode>"
> > -  [(set (match_operand:PTR 0 "register_operand")
> > + [(set (match_operand:PTR 0 "register_operand" "r")
> >         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
> >                      (match_operand:PTR 2 "memory_operand" "m")]
> >          UNSPEC_SP_TEST))
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-04  8:19 ` James Greenhalgh
@ 2014-09-04 18:20   ` Venkataramanan Kumar
  2014-09-05 15:48     ` Marcus Shawcroft
  2014-09-16 21:36   ` Andrew Pinski
  1 sibling, 1 reply; 20+ messages in thread
From: Venkataramanan Kumar @ 2014-09-04 18:20 UTC (permalink / raw)
  To: James Greenhalgh
  Cc: Marcus Shawcroft, gcc-patches, Patch Tracking, Richard Earnshaw

Hi James,

Yes we can just mark operand 3 as "&r".

PFB, the updated patch.   Ok for trunk?

regards,
Venkat.

gcc/ChangeLog

2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>

      * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
      constraint for operand 0 and remove write only constraint from operand 3.

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index b5be79c..cf6fdb0 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -4026,11 +4026,11 @@
 })

 (define_insn "stack_protect_test_<mode>"
-  [(set (match_operand:PTR 0 "register_operand")
+  [(set (match_operand:PTR 0 "register_operand" "=r")
        (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
                     (match_operand:PTR 2 "memory_operand" "m")]
         UNSPEC_SP_TEST))
-   (clobber (match_scratch:PTR 3 "=&r"))]
+   (clobber (match_scratch:PTR 3 "&r"))]
   ""
   "ldr\t%<w>3, %x1\;ldr\t%<w>0, %x2\;eor\t%<w>0, %<w>3, %<w>0"
   [(set_attr "length" "12")


regards,
Venkat,

On 4 September 2014 13:48, James Greenhalgh <james.greenhalgh@arm.com> wrote:
> On Thu, Sep 04, 2014 at 08:42:31AM +0100, Venkataramanan Kumar wrote:
>> Hi maintainers,
>>
>> I just added "=r" and retested it.
>
> I had a very similar patch to this sitting in my local tree. However,
> I am surprised you have left operand 3 as an output operand. In my tree
> I had marked operand 3 as "&r".
>
> What do you think?
>
> Thanks,
> James
>
>> gcc/ChangeLog
>>
>> 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>>
>>        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>>        constraint for operand 0.
>>
>> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
>> index b5be79c..ed6e602 100644
>> --- a/gcc/config/aarch64/aarch64.md
>> +++ b/gcc/config/aarch64/aarch64.md
>> @@ -4026,7 +4026,7 @@
>>  })
>>
>>  (define_insn "stack_protect_test_<mode>"
>> -  [(set (match_operand:PTR 0 "register_operand")
>> +  [(set (match_operand:PTR 0 "register_operand" "=r")
>>         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
>>                      (match_operand:PTR 2 "memory_operand" "m")]
>>          UNSPEC_SP_TEST))
>>
>> regards,
>> venkat.
>>
>> On 4 September 2014 12:42, Venkataramanan Kumar
>> <venkataramanan.kumar@linaro.org> wrote:
>> > Hi Maintainers,
>> >
>> > Below patch adds register constraint "r" for destination operand in
>> > "stack_protect_test" pattern.
>> >
>> > We need a general register here and adding "r" will avoid vector
>> > register getting allocated.
>> >
>> > regression tested on aarch64-unknown-linux-gnu.
>> >
>> > Ok for trunk?
>> >
>> > regards,
>> > Venkat.
>> >
>> >
>> > gcc/ChangeLog
>> >
>> > 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>> >
>> >        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>> >        constraint for operand 0.
>> >
>> >
>> > diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
>> > index b5be79c..77588b9 100644
>> > --- a/gcc/config/aarch64/aarch64.md
>> > +++ b/gcc/config/aarch64/aarch64.md
>> > @@ -4026,7 +4026,7 @@
>> >  })
>> >
>> >  (define_insn "stack_protect_test_<mode>"
>> > -  [(set (match_operand:PTR 0 "register_operand")
>> > + [(set (match_operand:PTR 0 "register_operand" "r")
>> >         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
>> >                      (match_operand:PTR 2 "memory_operand" "m")]
>> >          UNSPEC_SP_TEST))
>>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-04 18:20   ` Venkataramanan Kumar
@ 2014-09-05 15:48     ` Marcus Shawcroft
  2014-09-08 15:36       ` Venkataramanan Kumar
  0 siblings, 1 reply; 20+ messages in thread
From: Marcus Shawcroft @ 2014-09-05 15:48 UTC (permalink / raw)
  To: Venkataramanan Kumar; +Cc: gcc-patches, Patch Tracking

On 4 September 2014 19:19, Venkataramanan Kumar
<venkataramanan.kumar@linaro.org> wrote:
> Hi James,
>
> Yes we can just mark operand 3 as "&r".
>
> PFB, the updated patch.   Ok for trunk?
>
> regards,
> Venkat.
>
> gcc/ChangeLog
>
> 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>
>       * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>       constraint for operand 0 and remove write only constraint from operand 3.

OK include pr63190 in the ChangeLog entry and backport to 4.9 please.
Thanks
/Marcus

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-05 15:48     ` Marcus Shawcroft
@ 2014-09-08 15:36       ` Venkataramanan Kumar
  2014-09-08 16:27         ` Marcus Shawcroft
  0 siblings, 1 reply; 20+ messages in thread
From: Venkataramanan Kumar @ 2014-09-08 15:36 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: gcc-patches, Patch Tracking

Hi Marcus,

I up streamed the changes to trunk.

There is no support for stack protection in FSF GCC 4.9 branch yet.
So I need to back port r209712 and this change together.

regards,
Venkat.


On 5 September 2014 21:17, Marcus Shawcroft <marcus.shawcroft@gmail.com> wrote:
> On 4 September 2014 19:19, Venkataramanan Kumar
> <venkataramanan.kumar@linaro.org> wrote:
>> Hi James,
>>
>> Yes we can just mark operand 3 as "&r".
>>
>> PFB, the updated patch.   Ok for trunk?
>>
>> regards,
>> Venkat.
>>
>> gcc/ChangeLog
>>
>> 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>>
>>       * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>>       constraint for operand 0 and remove write only constraint from operand 3.
>
> OK include pr63190 in the ChangeLog entry and backport to 4.9 please.
> Thanks
> /Marcus

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-08 15:36       ` Venkataramanan Kumar
@ 2014-09-08 16:27         ` Marcus Shawcroft
  0 siblings, 0 replies; 20+ messages in thread
From: Marcus Shawcroft @ 2014-09-08 16:27 UTC (permalink / raw)
  To: Venkataramanan Kumar; +Cc: gcc-patches, Patch Tracking

On 8 September 2014 16:36, Venkataramanan Kumar
<venkataramanan.kumar@linaro.org> wrote:
> Hi Marcus,
>
> I up streamed the changes to trunk.
>
> There is no support for stack protection in FSF GCC 4.9 branch yet.

Quite right, ignore my back port request.

Cheers
/Marcus

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-04  8:19 ` James Greenhalgh
  2014-09-04 18:20   ` Venkataramanan Kumar
@ 2014-09-16 21:36   ` Andrew Pinski
  2014-09-16 22:01     ` Venkataramanan Kumar
  2014-09-16 22:03     ` James Greenhalgh
  1 sibling, 2 replies; 20+ messages in thread
From: Andrew Pinski @ 2014-09-16 21:36 UTC (permalink / raw)
  To: James Greenhalgh
  Cc: Venkataramanan Kumar, Marcus Shawcroft, gcc-patches,
	Patch Tracking, Richard Earnshaw

On Thu, Sep 4, 2014 at 1:18 AM, James Greenhalgh
<james.greenhalgh@arm.com> wrote:
> On Thu, Sep 04, 2014 at 08:42:31AM +0100, Venkataramanan Kumar wrote:
>> Hi maintainers,
>>
>> I just added "=r" and retested it.
>
> I had a very similar patch to this sitting in my local tree. However,
> I am surprised you have left operand 3 as an output operand. In my tree
> I had marked operand 3 as "&r".
>
> What do you think?

The clobber needs to be "=&r" as you are writing to the register and
not just reading from it.  I think this is causing some issues
including linaro bugzilla #667
(https://bugs.linaro.org/show_bug.cgi?id=667).

Thanks,
Andrew Pinski


>
> Thanks,
> James
>
>> gcc/ChangeLog
>>
>> 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>>
>>        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>>        constraint for operand 0.
>>
>> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
>> index b5be79c..ed6e602 100644
>> --- a/gcc/config/aarch64/aarch64.md
>> +++ b/gcc/config/aarch64/aarch64.md
>> @@ -4026,7 +4026,7 @@
>>  })
>>
>>  (define_insn "stack_protect_test_<mode>"
>> -  [(set (match_operand:PTR 0 "register_operand")
>> +  [(set (match_operand:PTR 0 "register_operand" "=r")
>>         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
>>                      (match_operand:PTR 2 "memory_operand" "m")]
>>          UNSPEC_SP_TEST))
>>
>> regards,
>> venkat.
>>
>> On 4 September 2014 12:42, Venkataramanan Kumar
>> <venkataramanan.kumar@linaro.org> wrote:
>> > Hi Maintainers,
>> >
>> > Below patch adds register constraint "r" for destination operand in
>> > "stack_protect_test" pattern.
>> >
>> > We need a general register here and adding "r" will avoid vector
>> > register getting allocated.
>> >
>> > regression tested on aarch64-unknown-linux-gnu.
>> >
>> > Ok for trunk?
>> >
>> > regards,
>> > Venkat.
>> >
>> >
>> > gcc/ChangeLog
>> >
>> > 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>> >
>> >        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>> >        constraint for operand 0.
>> >
>> >
>> > diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
>> > index b5be79c..77588b9 100644
>> > --- a/gcc/config/aarch64/aarch64.md
>> > +++ b/gcc/config/aarch64/aarch64.md
>> > @@ -4026,7 +4026,7 @@
>> >  })
>> >
>> >  (define_insn "stack_protect_test_<mode>"
>> > -  [(set (match_operand:PTR 0 "register_operand")
>> > + [(set (match_operand:PTR 0 "register_operand" "r")
>> >         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
>> >                      (match_operand:PTR 2 "memory_operand" "m")]
>> >          UNSPEC_SP_TEST))
>>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-16 21:36   ` Andrew Pinski
@ 2014-09-16 22:01     ` Venkataramanan Kumar
  2014-09-16 22:03     ` James Greenhalgh
  1 sibling, 0 replies; 20+ messages in thread
From: Venkataramanan Kumar @ 2014-09-16 22:01 UTC (permalink / raw)
  To: Andrew Pinski
  Cc: James Greenhalgh, Marcus Shawcroft, gcc-patches, Patch Tracking,
	Richard Earnshaw

Hi Andrew,

Thanks for pointing that.

I thought "&" modifier is enough to say that operand is early
clobbered and so GCC will use a different register and it will not
allocate same register that was given to a input operand.

Lookign at the the bug it looks like "=" is needed for the clobber,
so that GCC will allocate a fresh register.

regards,
Venkat.

On 17 September 2014 03:06, Andrew Pinski <pinskia@gmail.com> wrote:
> On Thu, Sep 4, 2014 at 1:18 AM, James Greenhalgh
> <james.greenhalgh@arm.com> wrote:
>> On Thu, Sep 04, 2014 at 08:42:31AM +0100, Venkataramanan Kumar wrote:
>>> Hi maintainers,
>>>
>>> I just added "=r" and retested it.
>>
>> I had a very similar patch to this sitting in my local tree. However,
>> I am surprised you have left operand 3 as an output operand. In my tree
>> I had marked operand 3 as "&r".
>>
>> What do you think?
>
> The clobber needs to be "=&r" as you are writing to the register and
> not just reading from it.  I think this is causing some issues
> including linaro bugzilla #667
> (https://bugs.linaro.org/show_bug.cgi?id=667).
>
> Thanks,
> Andrew Pinski
>
>
>>
>> Thanks,
>> James
>>
>>> gcc/ChangeLog
>>>
>>> 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>>>
>>>        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>>>        constraint for operand 0.
>>>
>>> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
>>> index b5be79c..ed6e602 100644
>>> --- a/gcc/config/aarch64/aarch64.md
>>> +++ b/gcc/config/aarch64/aarch64.md
>>> @@ -4026,7 +4026,7 @@
>>>  })
>>>
>>>  (define_insn "stack_protect_test_<mode>"
>>> -  [(set (match_operand:PTR 0 "register_operand")
>>> +  [(set (match_operand:PTR 0 "register_operand" "=r")
>>>         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
>>>                      (match_operand:PTR 2 "memory_operand" "m")]
>>>          UNSPEC_SP_TEST))
>>>
>>> regards,
>>> venkat.
>>>
>>> On 4 September 2014 12:42, Venkataramanan Kumar
>>> <venkataramanan.kumar@linaro.org> wrote:
>>> > Hi Maintainers,
>>> >
>>> > Below patch adds register constraint "r" for destination operand in
>>> > "stack_protect_test" pattern.
>>> >
>>> > We need a general register here and adding "r" will avoid vector
>>> > register getting allocated.
>>> >
>>> > regression tested on aarch64-unknown-linux-gnu.
>>> >
>>> > Ok for trunk?
>>> >
>>> > regards,
>>> > Venkat.
>>> >
>>> >
>>> > gcc/ChangeLog
>>> >
>>> > 2014-09-04 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>>> >
>>> >        * config/aarch64/aarch64.md (stack_protect_test_<mode>) Add register
>>> >        constraint for operand 0.
>>> >
>>> >
>>> > diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
>>> > index b5be79c..77588b9 100644
>>> > --- a/gcc/config/aarch64/aarch64.md
>>> > +++ b/gcc/config/aarch64/aarch64.md
>>> > @@ -4026,7 +4026,7 @@
>>> >  })
>>> >
>>> >  (define_insn "stack_protect_test_<mode>"
>>> > -  [(set (match_operand:PTR 0 "register_operand")
>>> > + [(set (match_operand:PTR 0 "register_operand" "r")
>>> >         (unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
>>> >                      (match_operand:PTR 2 "memory_operand" "m")]
>>> >          UNSPEC_SP_TEST))
>>>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-16 21:36   ` Andrew Pinski
  2014-09-16 22:01     ` Venkataramanan Kumar
@ 2014-09-16 22:03     ` James Greenhalgh
  2014-09-16 22:25       ` Andrew Pinski
                         ` (2 more replies)
  1 sibling, 3 replies; 20+ messages in thread
From: James Greenhalgh @ 2014-09-16 22:03 UTC (permalink / raw)
  To: Andrew Pinski
  Cc: Venkataramanan Kumar, Marcus Shawcroft, gcc-patches,
	Patch Tracking, Richard Earnshaw, doko, steve.mcintyre

On Tue, Sep 16, 2014 at 10:36:08PM +0100, Andrew Pinski wrote:
> On Thu, Sep 4, 2014 at 1:18 AM, James Greenhalgh
> <james.greenhalgh@arm.com> wrote:
> > On Thu, Sep 04, 2014 at 08:42:31AM +0100, Venkataramanan Kumar wrote:
> >> Hi maintainers,
> >>
> >> I just added "=r" and retested it.
> >
> > I had a very similar patch to this sitting in my local tree. However,
> > I am surprised you have left operand 3 as an output operand. In my tree
> > I had marked operand 3 as "&r".
> >
> > What do you think?
> 
> The clobber needs to be "=&r" as you are writing to the register and
> not just reading from it.  I think this is causing some issues
> including linaro bugzilla #667
> (https://bugs.linaro.org/show_bug.cgi?id=667).

(+CC Matthias Klose and Steve McIntyre who have also been in contact with me
regarding this bug)

I've seen this bug locally, and had considered sending the patch you
suggested, which does indeed fix the bug. However, it feels wrong as
the operand is not a formal output of the pattern. It is clobbered - and
indeed earlyclobbered - so yes it is written to, but it isn't an output.
This makes the fix look like a band-aid around the real problem.

The bug looks similar to pr52573 - regrename fails to spot that it should
not rename to a register used in an earlyclobber operand of any type, rather
than just an output+earlyclobber operand as it does now.

I've played about with a fix that sits in regrename, and forces it to think
of all earlyclobber operands as starting and ending chains but this didn't
bootstrap clean - we end up with what I believe are false reports of stack
smashing in libstdc++.

I was planning to look again at my approach tomorrow, I would like to
convince myself that this isn't a deficiency in regrename before I would
support just marking this operand "=&r".

If you have any other suggestions, or if "=&r" is actually correct and
I am misreading the documentation please let me know.

Thanks,
James

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-16 22:03     ` James Greenhalgh
@ 2014-09-16 22:25       ` Andrew Pinski
  2014-09-17  8:30       ` Richard Earnshaw
  2014-09-17 13:14       ` [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern Matthias Klose
  2 siblings, 0 replies; 20+ messages in thread
From: Andrew Pinski @ 2014-09-16 22:25 UTC (permalink / raw)
  To: James Greenhalgh
  Cc: Venkataramanan Kumar, Marcus Shawcroft, gcc-patches,
	Patch Tracking, Richard Earnshaw, Matthias Klose, Steve McIntyre

On Tue, Sep 16, 2014 at 3:03 PM, James Greenhalgh
<james.greenhalgh@arm.com> wrote:
> On Tue, Sep 16, 2014 at 10:36:08PM +0100, Andrew Pinski wrote:
>> On Thu, Sep 4, 2014 at 1:18 AM, James Greenhalgh
>> <james.greenhalgh@arm.com> wrote:
>> > On Thu, Sep 04, 2014 at 08:42:31AM +0100, Venkataramanan Kumar wrote:
>> >> Hi maintainers,
>> >>
>> >> I just added "=r" and retested it.
>> >
>> > I had a very similar patch to this sitting in my local tree. However,
>> > I am surprised you have left operand 3 as an output operand. In my tree
>> > I had marked operand 3 as "&r".
>> >
>> > What do you think?
>>
>> The clobber needs to be "=&r" as you are writing to the register and
>> not just reading from it.  I think this is causing some issues
>> including linaro bugzilla #667
>> (https://bugs.linaro.org/show_bug.cgi?id=667).
>
> (+CC Matthias Klose and Steve McIntyre who have also been in contact with me
> regarding this bug)
>
> I've seen this bug locally, and had considered sending the patch you
> suggested, which does indeed fix the bug. However, it feels wrong as
> the operand is not a formal output of the pattern. It is clobbered - and
> indeed earlyclobbered - so yes it is written to, but it isn't an output.
> This makes the fix look like a band-aid around the real problem.
>
> The bug looks similar to pr52573 - regrename fails to spot that it should
> not rename to a register used in an earlyclobber operand of any type, rather
> than just an output+earlyclobber operand as it does now.
>
> I've played about with a fix that sits in regrename, and forces it to think
> of all earlyclobber operands as starting and ending chains but this didn't
> bootstrap clean - we end up with what I believe are false reports of stack
> smashing in libstdc++.
>
> I was planning to look again at my approach tomorrow, I would like to
> convince myself that this isn't a deficiency in regrename before I would
> support just marking this operand "=&r".
>
> If you have any other suggestions, or if "=&r" is actually correct and
> I am misreading the documentation please let me know.

I think you misread the documentation.

Or rather the documentation is not fully clear here.
https://gcc.gnu.org/onlinedocs/gccint/Modifiers.html says this for "&":
‘&’ does not obviate the need to write ‘=’ or ‘+’.

Which means you need "=" if you write to the register.  Match_scratch
is the same as match_operand except it is able to be added back during
combine.

Also "=" means:
Means that this operand is write-only for this instruction: the
previous value is discarded and replaced by output data.

That is not necessary a formal output of the pattern.

Thanks,
Andrew

Thanks,
Andrew Pinski



>
> Thanks,
> James
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-16 22:03     ` James Greenhalgh
  2014-09-16 22:25       ` Andrew Pinski
@ 2014-09-17  8:30       ` Richard Earnshaw
  2014-09-17 14:43         ` [PATCH AArch64]: Add constraint letter for stack_protect_test pattern) James Greenhalgh
  2014-09-17 13:14       ` [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern Matthias Klose
  2 siblings, 1 reply; 20+ messages in thread
From: Richard Earnshaw @ 2014-09-17  8:30 UTC (permalink / raw)
  To: James Greenhalgh, Andrew Pinski
  Cc: Venkataramanan Kumar, Marcus Shawcroft, gcc-patches,
	Patch Tracking, doko, steve.mcintyre

On 16/09/14 23:03, James Greenhalgh wrote:
> On Tue, Sep 16, 2014 at 10:36:08PM +0100, Andrew Pinski wrote:
>> On Thu, Sep 4, 2014 at 1:18 AM, James Greenhalgh
>> <james.greenhalgh@arm.com> wrote:
>>> On Thu, Sep 04, 2014 at 08:42:31AM +0100, Venkataramanan Kumar wrote:
>>>> Hi maintainers,
>>>>
>>>> I just added "=r" and retested it.
>>>
>>> I had a very similar patch to this sitting in my local tree. However,
>>> I am surprised you have left operand 3 as an output operand. In my tree
>>> I had marked operand 3 as "&r".
>>>
>>> What do you think?
>>
>> The clobber needs to be "=&r" as you are writing to the register and
>> not just reading from it.  I think this is causing some issues
>> including linaro bugzilla #667
>> (https://bugs.linaro.org/show_bug.cgi?id=667).
> 
> (+CC Matthias Klose and Steve McIntyre who have also been in contact with me
> regarding this bug)
> 
> I've seen this bug locally, and had considered sending the patch you
> suggested, which does indeed fix the bug. However, it feels wrong as
> the operand is not a formal output of the pattern. It is clobbered - and
> indeed earlyclobbered - so yes it is written to, but it isn't an output.
> This makes the fix look like a band-aid around the real problem.
> 
> The bug looks similar to pr52573 - regrename fails to spot that it should
> not rename to a register used in an earlyclobber operand of any type, rather
> than just an output+earlyclobber operand as it does now.
> 
> I've played about with a fix that sits in regrename, and forces it to think
> of all earlyclobber operands as starting and ending chains but this didn't
> bootstrap clean - we end up with what I believe are false reports of stack
> smashing in libstdc++.
> 
> I was planning to look again at my approach tomorrow, I would like to
> convince myself that this isn't a deficiency in regrename before I would
> support just marking this operand "=&r".
> 
> If you have any other suggestions, or if "=&r" is actually correct and
> I am misreading the documentation please let me know.
> 
> Thanks,
> James
> 

"=&r" is correct for an early-clobbered scratch.

R.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-16 22:03     ` James Greenhalgh
  2014-09-16 22:25       ` Andrew Pinski
  2014-09-17  8:30       ` Richard Earnshaw
@ 2014-09-17 13:14       ` Matthias Klose
  2014-09-17 22:57         ` Matthias Klose
  2014-09-18 22:36         ` Matthias Klose
  2 siblings, 2 replies; 20+ messages in thread
From: Matthias Klose @ 2014-09-17 13:14 UTC (permalink / raw)
  To: James Greenhalgh, Andrew Pinski
  Cc: Venkataramanan Kumar, Marcus Shawcroft, gcc-patches,
	Patch Tracking, Richard Earnshaw, steve.mcintyre

[-- Attachment #1: Type: text/plain, Size: 2250 bytes --]

Am 17.09.2014 um 00:03 schrieb James Greenhalgh:
> If you have any other suggestions, or if "=&r" is actually correct and
> I am misreading the documentation please let me know.

with this patch I see a lot of ICEs in the testsuite for test cases built with
-O3 (and a build defaulting to -fstack-protector-strong by default), all of the
form:

Executing on host: /home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/xgcc
-B/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/  -fno-diagnostics-show-caret -fdia
gnostics-color=never   -O3 -fomit-frame-pointer -funroll-all-loops
-finline-functions  -w -c   -o 900116-1.o /home/doko/gcc/4.9/gcc-4.9-4.9.1/src/g
cc/testsuite/gcc.c-torture/compile/900116-1.c    (timeout = 300)
spawn /home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/xgcc
-B/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/ -fno-diagnostics-show-caret
-fdiagnostics-color
=never -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -w -c -o
900116-1.o /home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-
torture/compile/900116-1.c
/home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-torture/compile/900116-1.c:
In function 'zloop':
/home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-torture/compile/900116-1.c:14:1:
error: insn does not satisfy its constraints:
(insn 228 225 230 9 (parallel [
            (set (reg:DI 1 x1 [279])
                (unspec:DI [
                        (mem/v/f/c:DI (plus:DI (reg/f:DI 31 sp)
                                (const_int 24 [0x18])) [4 D.2626+0 S8 A64])
                        (mem/v/f/c:DI (reg/f:DI 2 x2 [277]) [4
__stack_chk_guard+0 S8 A64])
                    ] UNSPEC_SP_TEST))
            (clobber (reg:DI 2 x2 [320]))
        ])
/home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-torture/compile/900116-1.c:14
741 {stack_protect_test_di}
     (expr_list:REG_DEAD (reg/f:DI 13 x13 [277])
        (expr_list:REG_UNUSED (reg:DI 2 x2 [320])
            (nil))))
/home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-torture/compile/900116-1.c:14:1:
internal compiler error: in copyprop_hardreg_forward_1, at regcprop.c:775
Please submit a full bug report,
with preprocessed source if appropriate.

for now only tested with the 4.9 linaro branch, now testing with trunk.

Matthias


[-- Attachment #2: ts.diff --]
[-- Type: text/plain, Size: 40848 bytes --]

--- -	2014-09-17 13:13:05.245022015 +0000
+++ test-summary	2014-09-17 03:02:55.916771634 +0000
@@ -1,4 +1,4 @@
-Results for 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) testsuite on aarch64-unknown-linux-gnu
+Results for 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) testsuite on aarch64-unknown-linux-gnu
 LAST_UPDATED: Fri Sep 12 17:12:16 UTC 2014 (revision 215228)
 
 Native configuration is aarch64-unknown-linux-gnu
@@ -78,19 +78,16 @@
 
 # of expected passes		116
 # of unexpected failures	6
-/build/buildd/gcc-4.9-4.9.1/build/./gcc/gccgo version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2)
+/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/./gcc/gccgo version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1)
 
 		=== libgomp tests ===
 
 
 Running target unix
-WARNING: program timed out.
-FAIL: libgomp.graphite/force-parallel-6.c execution test
 
 		=== libgomp Summary for unix ===
 
-# of expected passes		3240
-# of unexpected failures	1
+# of expected passes		3241
 # of unsupported tests		36
 
 Running target unix/-fno-stack-protector
@@ -102,8 +99,7 @@
 
 		=== libgomp Summary ===
 
-# of expected passes		6481
-# of unexpected failures	1
+# of expected passes		6482
 # of unsupported tests		72
 		=== libitm tests ===
 
@@ -198,14 +194,29 @@
 # of expected failures		82
 # of unsupported tests		504
 Target: aarch64-linux-gnu
-gcc version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) 
+gcc version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) 
 
 		=== g++ tests ===
 
 
 Running target unix
+FAIL: g++.dg/opt/unroll1.C -std=gnu++98 (internal compiler error)
+FAIL: g++.dg/opt/unroll1.C -std=gnu++98 (test for excess errors)
+UNRESOLVED: g++.dg/opt/unroll1.C -std=gnu++98 compilation failed to produce executable
+FAIL: g++.dg/opt/unroll1.C -std=gnu++11 (internal compiler error)
+FAIL: g++.dg/opt/unroll1.C -std=gnu++11 (test for excess errors)
+UNRESOLVED: g++.dg/opt/unroll1.C -std=gnu++11 compilation failed to produce executable
+FAIL: g++.dg/opt/unroll1.C -std=gnu++1y (internal compiler error)
+FAIL: g++.dg/opt/unroll1.C -std=gnu++1y (test for excess errors)
+UNRESOLVED: g++.dg/opt/unroll1.C -std=gnu++1y compilation failed to produce executable
 XPASS: g++.dg/tls/thread_local-order2.C -std=c++11 execution test
 XPASS: g++.dg/tls/thread_local-order2.C -std=c++1y execution test
+FAIL: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
 FAIL: c-c++-common/torture/vector-subscript-1.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 FAIL: c-c++-common/torture/vector-subscript-1.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 UNRESOLVED: c-c++-common/torture/vector-subscript-1.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
@@ -216,10 +227,6 @@
 FAIL: g++.dg/torture/pr42760.C  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 FAIL: g++.dg/torture/pr42760.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 FAIL: g++.dg/torture/pr42760.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
-FAIL: g++.dg/torture/pr58369.C  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
-FAIL: g++.dg/torture/pr58369.C  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
-FAIL: g++.dg/torture/pr58369.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
-FAIL: g++.dg/torture/pr58369.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
 FAIL: g++.dg/torture/pr59163.C  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 FAIL: g++.dg/torture/pr59163.C  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 UNRESOLVED: g++.dg/torture/pr59163.C  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
@@ -230,20 +237,16 @@
 FAIL: g++.dg/torture/pr60895.C  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 FAIL: g++.dg/torture/pr60895.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 FAIL: g++.dg/torture/pr60895.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
-FAIL: g++.dg/torture/pr62175.C  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
-FAIL: g++.dg/torture/pr62175.C  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
-FAIL: g++.dg/torture/pr62175.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
-FAIL: g++.dg/torture/pr62175.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
 FAIL: g++.dg/tree-prof/pr59255.C compilation,  -fprofile-use (internal compiler error)
 UNRESOLVED: g++.dg/tree-prof/pr59255.C execution,    -fprofile-use
 
 		=== g++ Summary for unix ===
 
-# of expected passes		80380
-# of unexpected failures	25
+# of expected passes		80374
+# of unexpected failures	27
 # of unexpected successes	2
 # of expected failures		445
-# of unresolved testcases	5
+# of unresolved testcases	10
 # of unsupported tests		3082
 
 Running target unix/-fno-stack-protector
@@ -259,13 +262,13 @@
 
 		=== g++ Summary ===
 
-# of expected passes		160778
-# of unexpected failures	25
+# of expected passes		160772
+# of unexpected failures	27
 # of unexpected successes	4
 # of expected failures		890
-# of unresolved testcases	5
+# of unresolved testcases	10
 # of unsupported tests		6164
-/build/buildd/gcc-4.9-4.9.1/build/gcc/testsuite/g++/../../xg++  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) 
+/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/testsuite/g++/../../xg++  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) 
 
 		=== gcc tests ===
 
@@ -275,44 +278,90 @@
 FAIL: gcc.c-torture/compile/20000403-1.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 FAIL: gcc.c-torture/compile/20000403-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 FAIL: gcc.c-torture/compile/20000403-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.c-torture/compile/20020604-1.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.c-torture/compile/20020604-1.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.c-torture/compile/20020604-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.c-torture/compile/20020604-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
 FAIL: gcc.c-torture/compile/900116-1.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 FAIL: gcc.c-torture/compile/900116-1.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 FAIL: gcc.c-torture/compile/900116-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 FAIL: gcc.c-torture/compile/900116-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
-FAIL: gcc.c-torture/compile/pr33133.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
-FAIL: gcc.c-torture/compile/pr33133.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
-FAIL: gcc.c-torture/compile/pr33133.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
-FAIL: gcc.c-torture/compile/pr33133.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr27373.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr27373.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr27373.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr27373.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr33173.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr33173.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr33173.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr33173.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr38564.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr38564.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr38564.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr38564.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr39423-1.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr39423-1.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr39423-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr39423-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr46883.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr46883.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.c-torture/compile/pr46883.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.c-torture/compile/pr46883.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
 FAIL: gcc.c-torture/compile/ssa-pre-1.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 FAIL: gcc.c-torture/compile/ssa-pre-1.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 FAIL: gcc.c-torture/compile/ssa-pre-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 FAIL: gcc.c-torture/compile/ssa-pre-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.c-torture/execute/builtins/strcat-chk.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/builtins/strcat-chk.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/builtins/strcat-chk.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/builtins/strcat-chk.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
 FAIL: gcc.c-torture/execute/builtins/strncat-chk.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/builtins/strncat-chk.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
 FAIL: gcc.c-torture/execute/builtins/strncat-chk.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/builtins/strncat-chk.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
-FAIL: gcc.c-torture/execute/20000801-1.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
-UNRESOLVED: gcc.c-torture/execute/20000801-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
-FAIL: gcc.c-torture/execute/20000801-1.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
-UNRESOLVED: gcc.c-torture/execute/20000801-1.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/builtins/vsprintf-chk.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/builtins/vsprintf-chk.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/builtins/vsprintf-chk.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/builtins/vsprintf-chk.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
 FAIL: gcc.c-torture/execute/20001026-1.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/20001026-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
 FAIL: gcc.c-torture/execute/20001026-1.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/20001026-1.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/20010910-1.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/20010910-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/20010910-1.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/20010910-1.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
 FAIL: gcc.c-torture/execute/20030105-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
 FAIL: gcc.c-torture/execute/20030105-1.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/20041214-1.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/20041214-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/20041214-1.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/20041214-1.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
 FAIL: gcc.c-torture/execute/920411-1.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/920411-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
 FAIL: gcc.c-torture/execute/920411-1.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/920411-1.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
-FAIL: gcc.c-torture/execute/pr42691.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
-UNRESOLVED: gcc.c-torture/execute/pr42691.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
-FAIL: gcc.c-torture/execute/pr42691.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
-UNRESOLVED: gcc.c-torture/execute/pr42691.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
-FAIL: gcc.c-torture/execute/pr47538.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
-UNRESOLVED: gcc.c-torture/execute/pr47538.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
-FAIL: gcc.c-torture/execute/pr47538.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
-UNRESOLVED: gcc.c-torture/execute/pr47538.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/920625-1.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/920625-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/920625-1.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/920625-1.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/multi-ix.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/multi-ix.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/multi-ix.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/multi-ix.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/pr33992.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/pr33992.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/pr33992.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/pr33992.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/pr34176.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/pr34176.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/pr34176.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/pr34176.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/pr38051.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/pr38051.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/pr45070.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/pr45070.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/pr45070.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/pr45070.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
 FAIL: gcc.c-torture/execute/pr59229.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/pr59229.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
 FAIL: gcc.c-torture/execute/pr59229.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
@@ -321,15 +370,44 @@
 UNRESOLVED: gcc.c-torture/execute/scal-to-vec3.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
 FAIL: gcc.c-torture/execute/scal-to-vec3.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/scal-to-vec3.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/stdarg-3.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/stdarg-3.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/stdarg-3.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/stdarg-3.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/va-arg-10.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/va-arg-10.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/va-arg-10.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/va-arg-10.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
 FAIL: gcc.c-torture/execute/va-arg-11.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/va-arg-11.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
 FAIL: gcc.c-torture/execute/va-arg-11.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 UNRESOLVED: gcc.c-torture/execute/va-arg-11.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/execute/ieee/copysign2.c compilation,  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/ieee/copysign2.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
+FAIL: gcc.c-torture/execute/ieee/copysign2.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+UNRESOLVED: gcc.c-torture/execute/ieee/copysign2.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
+FAIL: gcc.c-torture/unsorted/lll.c,  -O3 -fomit-frame-pointer -funroll-loops   (internal compiler error)
+FAIL: gcc.c-torture/unsorted/lll.c,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions   (internal compiler error)
+FAIL: gcc.dg/atomic/c11-atomic-exec-2.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.dg/atomic/c11-atomic-exec-2.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: gcc.dg/atomic/c11-atomic-exec-2.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: gcc.dg/atomic/c11-atomic-exec-5.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.dg/atomic/c11-atomic-exec-5.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: gcc.dg/atomic/c11-atomic-exec-5.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
 FAIL: gcc.dg/loop-4.c (internal compiler error)
 FAIL: gcc.dg/loop-4.c (test for excess errors)
 UNRESOLVED: gcc.dg/loop-4.c compilation failed to produce executable
 FAIL: gcc.dg/pr40209.c (internal compiler error)
 FAIL: gcc.dg/pr40209.c (test for excess errors)
+FAIL: gcc.dg/pr50161.c (internal compiler error)
+FAIL: gcc.dg/pr50161.c (test for excess errors)
+UNRESOLVED: gcc.dg/pr50161.c compilation failed to produce executable
+FAIL: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: c-c++-common/torture/vector-shift.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
 FAIL: c-c++-common/torture/vector-subscript-1.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 FAIL: c-c++-common/torture/vector-subscript-1.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 UNRESOLVED: c-c++-common/torture/vector-subscript-1.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
@@ -340,6 +418,16 @@
 FAIL: gcc.dg/torture/builtin-math-2.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 FAIL: gcc.dg/torture/builtin-math-2.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 FAIL: gcc.dg/torture/builtin-math-2.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.dg/torture/pr43017.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.dg/torture/pr43017.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: gcc.dg/torture/pr43017.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: gcc.dg/torture/pr43017.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.dg/torture/pr43017.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: gcc.dg/torture/pr43017.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
+FAIL: gcc.dg/torture/pr44807.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.dg/torture/pr44807.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.dg/torture/pr44807.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.dg/torture/pr44807.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
 FAIL: gcc.dg/torture/pr45967-3.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 FAIL: gcc.dg/torture/pr45967-3.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 UNRESOLVED: gcc.dg/torture/pr45967-3.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
@@ -360,10 +448,14 @@
 FAIL: gcc.dg/torture/pr48731.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 FAIL: gcc.dg/torture/pr48731.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 FAIL: gcc.dg/torture/pr48731.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
-FAIL: gcc.dg/torture/pr49603.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
-FAIL: gcc.dg/torture/pr49603.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
-FAIL: gcc.dg/torture/pr49603.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
-FAIL: gcc.dg/torture/pr49603.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.dg/torture/pr53144.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.dg/torture/pr53144.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.dg/torture/pr53144.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.dg/torture/pr53144.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+FAIL: gcc.dg/torture/pr55684.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.dg/torture/pr55684.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.dg/torture/pr55684.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.dg/torture/pr55684.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
 FAIL: gcc.dg/torture/pr55755.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 FAIL: gcc.dg/torture/pr55755.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 UNRESOLVED: gcc.dg/torture/pr55755.c  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
@@ -400,11 +492,11 @@
 
 		=== gcc Summary for unix ===
 
-# of expected passes		91376
-# of unexpected failures	96
+# of expected passes		91308
+# of unexpected failures	159
 # of unexpected successes	1
 # of expected failures		255
-# of unresolved testcases	29
+# of unresolved testcases	55
 # of unsupported tests		1364
 
 Running target unix/-fno-stack-protector
@@ -427,32 +519,62 @@
 
 		=== gcc Summary ===
 
-# of expected passes		182842
-# of unexpected failures	103
+# of expected passes		182774
+# of unexpected failures	166
 # of unexpected successes	2
 # of expected failures		510
-# of unresolved testcases	29
+# of unresolved testcases	55
 # of unsupported tests		2728
-/build/buildd/gcc-4.9-4.9.1/build/gcc/xgcc  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) 
+/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/xgcc  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) 
 
 		=== gfortran tests ===
 
 
 Running target unix
+FAIL: gfortran.dg/c_assoc.f90  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gfortran.dg/c_assoc.f90  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: gfortran.dg/c_assoc.f90  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: gfortran.dg/c_assoc.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gfortran.dg/c_assoc.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: gfortran.dg/c_assoc.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
 FAIL: gfortran.dg/c_f_pointer_complex.f03  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
 FAIL: gfortran.dg/c_f_pointer_complex.f03  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
 UNRESOLVED: gfortran.dg/c_f_pointer_complex.f03  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
 FAIL: gfortran.dg/c_f_pointer_complex.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
 FAIL: gfortran.dg/c_f_pointer_complex.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
 UNRESOLVED: gfortran.dg/c_f_pointer_complex.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
+FAIL: gfortran.dg/f2c_4.f90  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gfortran.dg/f2c_4.f90  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: gfortran.dg/f2c_4.f90  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: gfortran.dg/f2c_4.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gfortran.dg/f2c_4.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: gfortran.dg/f2c_4.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
+FAIL: gfortran.dg/iso_c_binding_rename_1.f03  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gfortran.dg/iso_c_binding_rename_1.f03  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: gfortran.dg/iso_c_binding_rename_1.f03  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: gfortran.dg/iso_c_binding_rename_1.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gfortran.dg/iso_c_binding_rename_1.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: gfortran.dg/iso_c_binding_rename_1.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
+FAIL: gfortran.dg/iso_c_binding_rename_2.f03  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gfortran.dg/iso_c_binding_rename_2.f03  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: gfortran.dg/iso_c_binding_rename_2.f03  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: gfortran.dg/iso_c_binding_rename_2.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gfortran.dg/iso_c_binding_rename_2.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: gfortran.dg/iso_c_binding_rename_2.f03  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
 FAIL: gfortran.dg/pr45636.f90  -O   scan-tree-dump-times forwprop2 "memset" 0
+FAIL: gfortran.dg/test_only_clause.f90  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gfortran.dg/test_only_clause.f90  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+UNRESOLVED: gfortran.dg/test_only_clause.f90  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
+FAIL: gfortran.dg/test_only_clause.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gfortran.dg/test_only_clause.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: gfortran.dg/test_only_clause.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
 
 		=== gfortran Summary for unix ===
 
-# of expected passes		45459
-# of unexpected failures	5
+# of expected passes		45439
+# of unexpected failures	25
 # of expected failures		53
-# of unresolved testcases	2
+# of unresolved testcases	12
 # of unsupported tests		59
 
 Running target unix/-fno-stack-protector
@@ -467,12 +589,12 @@
 
 		=== gfortran Summary ===
 
-# of expected passes		90922
-# of unexpected failures	6
+# of expected passes		90902
+# of unexpected failures	26
 # of expected failures		106
-# of unresolved testcases	2
+# of unresolved testcases	12
 # of unsupported tests		118
-/build/buildd/gcc-4.9-4.9.1/build/gcc/testsuite/gfortran/../../gfortran  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) 
+/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/testsuite/gfortran/../../gfortran  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) 
 
 		=== go tests ===
 
@@ -508,7 +630,7 @@
 # of expected failures		2
 # of untested testcases		20
 # of unsupported tests		6
-/build/buildd/gcc-4.9-4.9.1/build/gcc/testsuite/go/../../gccgo  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) 
+/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/testsuite/go/../../gccgo  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) 
 
 		=== obj-c++ tests ===
 
@@ -534,7 +656,7 @@
 # of expected passes		2882
 # of expected failures		20
 # of unsupported tests		172
-/build/buildd/gcc-4.9-4.9.1/build/gcc/testsuite/obj-c++/../../xg++  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) 
+/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/testsuite/obj-c++/../../xg++  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) 
 
 		=== objc tests ===
 
@@ -567,12 +689,12 @@
 # of unexpected failures	2
 # of unresolved testcases	2
 # of unsupported tests		148
-/build/buildd/gcc-4.9-4.9.1/build/gcc/xgcc  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) 
+/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/xgcc  version 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) 
 
 
-Compiler version: 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2) 
+Compiler version: 4.9.1 (Ubuntu/Linaro 4.9.1-14ubuntu2.1) 
 Platform: aarch64-unknown-linux-gnu
-configure flags: -v --with-pkgversion='Ubuntu/Linaro 4.9.1-14ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-arm64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-arm64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-arm64 --with-arch-directory=arm64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
+configure flags: -v --with-pkgversion='Ubuntu/Linaro 4.9.1-14ubuntu2.1' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-arm64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-arm64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-arm64 --with-arch-directory=arm64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
 BOOT_CFLAGS=-g -O2 -fno-stack-protector
 
 
@@ -583,14 +705,15 @@
 ||/ Name                      Version                   Architecture Description
 +++-=========================-=========================-============-===============================================================================
 ii  binutils                  2.24.51.20140903-1ubuntu1 arm64        GNU assembler, linker and binary utilities
-ii  g++-4.8                   4.8.3-10ubuntu1           arm64        GNU C++ compiler
-ii  g++-4.9                   4.9.1-14ubuntu1           arm64        GNU C++ compiler
+ii  g++-4.8                   4.8.3-11ubuntu1           arm64        GNU C++ compiler
+ii  g++-4.9                   4.9.1-14ubuntu2           arm64        GNU C++ compiler
 ii  libc6:arm64               2.19-10ubuntu1            arm64        GNU C Library: Shared libraries
-pi  libcloog-isl-dev:arm64    0.18.2-1                  arm64        Chunky Loop Generator (development files)
-pi  libgmp-dev:arm64          2:6.0.0+dfsg-4            arm64        Multiprecision arithmetic library developers tools
-pi  libisl-dev:arm64          0.12.2-2                  arm64        manipulating sets and relations of integer points bounded by linear constraints
-pi  libmpc-dev:arm64          1.0.2-1                   arm64        multiple precision complex floating-point library development package
-pi  libmpfr-dev:arm64         3.1.2-1                   arm64        multiple precision floating-point computation developers tools
+ii  libcloog-isl-dev:arm64    0.18.2-1                  arm64        Chunky Loop Generator (development files)
+ii  libgmp-dev:arm64          2:6.0.0+dfsg-4            arm64        Multiprecision arithmetic library developers tools
+ii  libgmp3-dev               2:6.0.0+dfsg-4            arm64        Multiprecision arithmetic library developers tools
+ii  libisl-dev:arm64          0.12.2-2                  arm64        manipulating sets and relations of integer points bounded by linear constraints
+ii  libmpc-dev:arm64          1.0.2-1                   arm64        multiple precision complex floating-point library development package
+ii  libmpfr-dev:arm64         3.1.2-1                   arm64        multiple precision floating-point computation developers tools
 
 
 svn-updates:
@@ -602,6 +725,9 @@
 gcc-linaro:
   Changes for the Linaro 4.9-2014.09 release.
 
+pr63190:
+  Fix PR target/63190
+
 svn-doc-updates:
   updates from the 4.9 branch upto 20140910 (documentation).
 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern)
  2014-09-17  8:30       ` Richard Earnshaw
@ 2014-09-17 14:43         ` James Greenhalgh
  2014-09-17 14:51           ` pinskia
  2014-09-18  8:18           ` Marcus Shawcroft
  0 siblings, 2 replies; 20+ messages in thread
From: James Greenhalgh @ 2014-09-17 14:43 UTC (permalink / raw)
  To: gcc-patches
  Cc: richard.earnshaw, marcus.shawcroft, venkataramanan.kumar,
	steve.mcintyre, patch, pinskia

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]


On Wed, Sep 17, 2014 at 09:30:31AM +0100, Richard Earnshaw wrote:
> "=&r" is correct for an early-clobbered scratch.
>
> R.

In that case...

How is the attached patch for trunk? I've bootstrapped it on AArch64
with -fstack-protector-strong and -frename-registers in the BOOT_CFLAGS
without seeing any issues.

OK?

Thanks,
James

---
gcc/

2014-09-15  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.md (stack_protect_test_<mode>): Mark
	scratch register as an output to placate register renaming.

gcc/testsuite/

2014-09-15  James Greenhalgh  <james.greenhalgh@arm.com>

	* gcc.target/aarch64/stack_protector_set_1.c: New.
	* gcc.target/aarch64/stack_protector_set_2.c: Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Re-PATCH-AArch64-Add-constraint-letter-for-stack_pro.patch --]
[-- Type: text/x-patch;  name=0001-Re-PATCH-AArch64-Add-constraint-letter-for-stack_pro.patch, Size: 1846 bytes --]

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index c60038a9015d614f40f6d9e3fd228ad3e2b247a8..f15a516bb0559c86bea7512f91d60dc179ec9149 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -4031,7 +4031,7 @@ (define_insn "stack_protect_test_<mode>"
 	(unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
 		     (match_operand:PTR 2 "memory_operand" "m")]
 	 UNSPEC_SP_TEST))
-   (clobber (match_scratch:PTR 3 "&r"))]
+   (clobber (match_scratch:PTR 3 "=&r"))]
   ""
   "ldr\t%<w>3, %x1\;ldr\t%<w>0, %x2\;eor\t%<w>0, %<w>3, %<w>0"
   [(set_attr "length" "12")
diff --git a/gcc/testsuite/gcc.target/aarch64/stack_protector_set_1.c b/gcc/testsuite/gcc.target/aarch64/stack_protector_set_1.c
new file mode 100644
index 0000000..df0d26b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/stack_protector_set_1.c
@@ -0,0 +1,15 @@
+/* { dg-do assemble } */
+/* { dg-options "-fstack-protector-strong -O1 -frename-registers" } */
+
+extern int bar (const char *s, int *argc);
+extern int baz (const char *s);
+
+char
+foo (const char *s)
+{
+  int argc;
+  int ret;
+  if ( !bar (s, &argc))
+    ret = baz (s);
+  return *s;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/stack_protector_set_2.c b/gcc/testsuite/gcc.target/aarch64/stack_protector_set_2.c
new file mode 100644
index 0000000..b94a2d6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/stack_protector_set_2.c
@@ -0,0 +1,17 @@
+/* { dg-do assemble } */
+/* { dg-options "-fstack-protector-strong -O1 -frename-registers" } */
+
+typedef unsigned int uint32_t;
+struct ctx
+{
+  uint32_t A;
+};
+
+void *
+buffer_copy (const struct ctx *ctx, void *resbuf)
+{
+  uint32_t buffer[4];
+  buffer[0] = (ctx->A);
+  __builtin_memcpy (resbuf, buffer, 16);
+  return resbuf;
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern)
  2014-09-17 14:43         ` [PATCH AArch64]: Add constraint letter for stack_protect_test pattern) James Greenhalgh
@ 2014-09-17 14:51           ` pinskia
  2014-09-18 10:15             ` James Greenhalgh
  2014-09-18  8:18           ` Marcus Shawcroft
  1 sibling, 1 reply; 20+ messages in thread
From: pinskia @ 2014-09-17 14:51 UTC (permalink / raw)
  To: James Greenhalgh
  Cc: gcc-patches, richard.earnshaw, marcus.shawcroft,
	venkataramanan.kumar, steve.mcintyre, patch



> On Sep 17, 2014, at 7:43 AM, James Greenhalgh <james.greenhalgh@arm.com> wrote:
> 
> 
>> On Wed, Sep 17, 2014 at 09:30:31AM +0100, Richard Earnshaw wrote:
>> "=&r" is correct for an early-clobbered scratch.
>> 
>> R.
> 
> In that case...
> 
> How is the attached patch for trunk? I've bootstrapped it on AArch64
> with -fstack-protector-strong and -frename-registers in the BOOT_CFLAGS
> without seeing any issues.
> 
> OK?
> 
> Thanks,
> James
> 
> ---
> gcc/
> 
> 2014-09-15  James Greenhalgh  <james.greenhalgh@arm.com>
> 
>   * config/aarch64/aarch64.md (stack_protect_test_<mode>): Mark
>   scratch register as an output to placate register renaming.
> 
> gcc/testsuite/
> 
> 2014-09-15  James Greenhalgh  <james.greenhalgh@arm.com>
> 
>   * gcc.target/aarch64/stack_protector_set_1.c: New.
>   * gcc.target/aarch64/stack_protector_set_2.c: Likewise.

There is nothing aarch64 specific about this testcase so I would place them under gcc.dg and add the extra marker which says this testcase requires stack protector.   And maybe even use compile instead of just assemble too. 

Thanks,
Andrew

> <0001-Re-PATCH-AArch64-Add-constraint-letter-for-stack_pro.patch>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-17 13:14       ` [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern Matthias Klose
@ 2014-09-17 22:57         ` Matthias Klose
  2014-09-18 22:36         ` Matthias Klose
  1 sibling, 0 replies; 20+ messages in thread
From: Matthias Klose @ 2014-09-17 22:57 UTC (permalink / raw)
  To: James Greenhalgh, Andrew Pinski
  Cc: Venkataramanan Kumar, Marcus Shawcroft, gcc-patches,
	Patch Tracking, Richard Earnshaw, steve.mcintyre

Am 17.09.2014 um 15:14 schrieb Matthias Klose:
> Am 17.09.2014 um 00:03 schrieb James Greenhalgh:
>> If you have any other suggestions, or if "=&r" is actually correct and
>> I am misreading the documentation please let me know.
> 
> with this patch I see a lot of ICEs in the testsuite for test cases built with
> -O3 (and a build defaulting to -fstack-protector-strong by default), all of the
> form:
> 
> Executing on host: /home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/xgcc
> -B/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/  -fno-diagnostics-show-caret -fdia
> gnostics-color=never   -O3 -fomit-frame-pointer -funroll-all-loops
> -finline-functions  -w -c   -o 900116-1.o /home/doko/gcc/4.9/gcc-4.9-4.9.1/src/g
> cc/testsuite/gcc.c-torture/compile/900116-1.c    (timeout = 300)
> spawn /home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/xgcc
> -B/home/doko/gcc/4.9/gcc-4.9-4.9.1/build/gcc/ -fno-diagnostics-show-caret
> -fdiagnostics-color
> =never -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -w -c -o
> 900116-1.o /home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-
> torture/compile/900116-1.c
> /home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-torture/compile/900116-1.c:
> In function 'zloop':
> /home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-torture/compile/900116-1.c:14:1:
> error: insn does not satisfy its constraints:
> (insn 228 225 230 9 (parallel [
>             (set (reg:DI 1 x1 [279])
>                 (unspec:DI [
>                         (mem/v/f/c:DI (plus:DI (reg/f:DI 31 sp)
>                                 (const_int 24 [0x18])) [4 D.2626+0 S8 A64])
>                         (mem/v/f/c:DI (reg/f:DI 2 x2 [277]) [4
> __stack_chk_guard+0 S8 A64])
>                     ] UNSPEC_SP_TEST))
>             (clobber (reg:DI 2 x2 [320]))
>         ])
> /home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-torture/compile/900116-1.c:14
> 741 {stack_protect_test_di}
>      (expr_list:REG_DEAD (reg/f:DI 13 x13 [277])
>         (expr_list:REG_UNUSED (reg:DI 2 x2 [320])
>             (nil))))
> /home/doko/gcc/4.9/gcc-4.9-4.9.1/src/gcc/testsuite/gcc.c-torture/compile/900116-1.c:14:1:
> internal compiler error: in copyprop_hardreg_forward_1, at regcprop.c:775
> Please submit a full bug report,
> with preprocessed source if appropriate.
> 
> for now only tested with the 4.9 linaro branch, now testing with trunk.

seen with trunk r215323 as well, after disabling itm (--disable-libitm) which
currently doesn't seem to build.

  Matthias

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern)
  2014-09-17 14:43         ` [PATCH AArch64]: Add constraint letter for stack_protect_test pattern) James Greenhalgh
  2014-09-17 14:51           ` pinskia
@ 2014-09-18  8:18           ` Marcus Shawcroft
  2014-09-18  9:06             ` Jakub Jelinek
  1 sibling, 1 reply; 20+ messages in thread
From: Marcus Shawcroft @ 2014-09-18  8:18 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, venkataramanan.kumar, pinskia

On 17 September 2014 15:43, James Greenhalgh <james.greenhalgh@arm.com> wrote:
>
> On Wed, Sep 17, 2014 at 09:30:31AM +0100, Richard Earnshaw wrote:
>> "=&r" is correct for an early-clobbered scratch.
>>
>> R.
>
> In that case...
>
> How is the attached patch for trunk? I've bootstrapped it on AArch64
> with -fstack-protector-strong and -frename-registers in the BOOT_CFLAGS
> without seeing any issues.
>
> OK?
>
> Thanks,
> James
>
> ---
> gcc/
>
> 2014-09-15  James Greenhalgh  <james.greenhalgh@arm.com>
>
>         * config/aarch64/aarch64.md (stack_protect_test_<mode>): Mark
>         scratch register as an output to placate register renaming.


OK for this part.


> gcc/testsuite/
>
> 2014-09-15  James Greenhalgh  <james.greenhalgh@arm.com>
>
>         * gcc.target/aarch64/stack_protector_set_1.c: New.
>         * gcc.target/aarch64/stack_protector_set_2.c: Likewise.

I agree with Andrew, these don't need to be aarch64 specific.

/Marcus

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern)
  2014-09-18  8:18           ` Marcus Shawcroft
@ 2014-09-18  9:06             ` Jakub Jelinek
  0 siblings, 0 replies; 20+ messages in thread
From: Jakub Jelinek @ 2014-09-18  9:06 UTC (permalink / raw)
  To: Marcus Shawcroft
  Cc: James Greenhalgh, gcc-patches, venkataramanan.kumar, pinskia

On Thu, Sep 18, 2014 at 09:18:53AM +0100, Marcus Shawcroft wrote:
> > gcc/testsuite/
> >
> > 2014-09-15  James Greenhalgh  <james.greenhalgh@arm.com>
> >
> >         * gcc.target/aarch64/stack_protector_set_1.c: New.
> >         * gcc.target/aarch64/stack_protector_set_2.c: Likewise.
> 
> I agree with Andrew, these don't need to be aarch64 specific.

Well, guess the 16 needs to be replaced with sizeof buffer, because
sizeof (unsigned int) is not 4 on all architectures.
And
/* { dg-require-effective-target fstack_protector } */
is needed, not all targets support -fstack-protector*.

	Jakub

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern)
  2014-09-17 14:51           ` pinskia
@ 2014-09-18 10:15             ` James Greenhalgh
  2014-09-19  9:06               ` Marcus Shawcroft
  0 siblings, 1 reply; 20+ messages in thread
From: James Greenhalgh @ 2014-09-18 10:15 UTC (permalink / raw)
  To: gcc-patches
  Cc: richard.earnshaw, marcus.shawcroft, venkataramanan.kumar,
	steve.mcintyre, patch, pinskia, jakub

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]


On Wed, Sep 17, 2014 at 03:50:55PM +0100, pinskia@gmail.com wrote:
>
>
> > On Sep 17, 2014, at 7:43 AM, James Greenhalgh <james.greenhalgh@arm.com> wrote:
> >
> >
> >> On Wed, Sep 17, 2014 at 09:30:31AM +0100, Richard Earnshaw wrote:
> >> "=&r" is correct for an early-clobbered scratch.
> >>
> >> R.
> >
> > In that case...
> >
> > How is the attached patch for trunk? I've bootstrapped it on AArch64
> > with -fstack-protector-strong and -frename-registers in the BOOT_CFLAGS
> > without seeing any issues.

> There is nothing aarch64 specific about this testcase so I would place them
> under gcc.dg and add the extra marker which says this testcase requires stack
> protector.

That sounds reasonable to me. Updated as attached, along with Jakub's
suggestions.

>   And maybe even use compile instead of just assemble too.

Compile is weaker than assemble. Assemble takes you up to an object file,
which is as far as we need to go.

Thanks,
James

---

gcc/

2014-09-18  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.md (stack_protect_test_<mode>): Mark
	scratch register as an output to placate register renaming.

gcc/testsuite/

2014-09-18  James Greenhalgh  <james.greenhalgh@arm.com>

	* gcc.dg/ssp-3.c: New.
	* gcc.dg/ssp-4.c: Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Re-PATCH-AArch64-Add-constraint-letter-for-stack_pro.patch --]
[-- Type: text/x-patch;  name=0001-Re-PATCH-AArch64-Add-constraint-letter-for-stack_pro.patch, Size: 1805 bytes --]

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index c60038a9015d614f40f6d9e3fd228ad3e2b247a8..f15a516bb0559c86bea7512f91d60dc179ec9149 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -4031,7 +4031,7 @@ (define_insn "stack_protect_test_<mode>"
 	(unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
 		     (match_operand:PTR 2 "memory_operand" "m")]
 	 UNSPEC_SP_TEST))
-   (clobber (match_scratch:PTR 3 "&r"))]
+   (clobber (match_scratch:PTR 3 "=&r"))]
   ""
   "ldr\t%<w>3, %x1\;ldr\t%<w>0, %x2\;eor\t%<w>0, %<w>3, %<w>0"
   [(set_attr "length" "12")
diff --git a/gcc/testsuite/gcc.dg/ssp-3.c b/gcc/testsuite/gcc.dg/ssp-3.c
new file mode 100644
index 0000000..98c12da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ssp-3.c
@@ -0,0 +1,16 @@
+/* { dg-do assemble } */
+/* { dg-options "-fstack-protector-strong -O1 -frename-registers" } */
+/* { dg-require-effective-target fstack_protector } */
+
+extern int bar (const char *s, int *argc);
+extern int baz (const char *s);
+
+char
+foo (const char *s)
+{
+  int argc;
+  int ret;
+  if ( !bar (s, &argc))
+    ret = baz (s);
+  return *s;
+}
diff --git a/gcc/testsuite/gcc.dg/ssp-4.c b/gcc/testsuite/gcc.dg/ssp-4.c
new file mode 100644
index 0000000..402033c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ssp-4.c
@@ -0,0 +1,18 @@
+/* { dg-do assemble } */
+/* { dg-options "-fstack-protector-strong -O1 -frename-registers" } */
+/* { dg-require-effective-target fstack_protector } */
+
+typedef unsigned int uint32_t;
+struct ctx
+{
+  uint32_t A;
+};
+
+void *
+buffer_copy (const struct ctx *ctx, void *resbuf)
+{
+  uint32_t buffer[4];
+  buffer[0] = (ctx->A);
+  __builtin_memcpy (resbuf, buffer, sizeof (buffer));
+  return resbuf;
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern.
  2014-09-17 13:14       ` [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern Matthias Klose
  2014-09-17 22:57         ` Matthias Klose
@ 2014-09-18 22:36         ` Matthias Klose
  1 sibling, 0 replies; 20+ messages in thread
From: Matthias Klose @ 2014-09-18 22:36 UTC (permalink / raw)
  To: James Greenhalgh, Andrew Pinski
  Cc: Venkataramanan Kumar, Marcus Shawcroft, gcc-patches,
	Patch Tracking, Richard Earnshaw, steve.mcintyre

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

Am 17.09.2014 um 15:14 schrieb Matthias Klose:
> Am 17.09.2014 um 00:03 schrieb James Greenhalgh:
>> If you have any other suggestions, or if "=&r" is actually correct and
>> I am misreading the documentation please let me know.
> 
> with this patch I see a lot of ICEs in the testsuite for test cases built with
> -O3 (and a build defaulting to -fstack-protector-strong by default), all of the
> form:

I tested with the wrong patch. No regression, and fixing the original issue with
the attached patch. Tested with the trunk and the Linaro 4.9 branch,

  Matthias



[-- Attachment #2: pr63190.diff --]
[-- Type: text/plain, Size: 404 bytes --]

--- gcc/config/aarch64/aarch64.md
+++ gcc/config/aarch64/aarch64.md
@@ -4031,7 +4031,7 @@
 	(unspec:PTR [(match_operand:PTR 1 "memory_operand" "m")
 		     (match_operand:PTR 2 "memory_operand" "m")]
 	 UNSPEC_SP_TEST))
-   (clobber (match_scratch:PTR 3 "&r"))]
+   (clobber (match_scratch:PTR 3 "=&r"))]
   ""
   "ldr\t%<w>3, %x1\;ldr\t%<w>0, %x2\;eor\t%<w>0, %<w>3, %<w>0"
   [(set_attr "length" "12")

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern)
  2014-09-18 10:15             ` James Greenhalgh
@ 2014-09-19  9:06               ` Marcus Shawcroft
  0 siblings, 0 replies; 20+ messages in thread
From: Marcus Shawcroft @ 2014-09-19  9:06 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches

On 18 September 2014 11:15, James Greenhalgh <james.greenhalgh@arm.com> wrote:

> gcc/
>
> 2014-09-18  James Greenhalgh  <james.greenhalgh@arm.com>
>
>         * config/aarch64/aarch64.md (stack_protect_test_<mode>): Mark
>         scratch register as an output to placate register renaming.
>
> gcc/testsuite/
>
> 2014-09-18  James Greenhalgh  <james.greenhalgh@arm.com>
>
>         * gcc.dg/ssp-3.c: New.
>         * gcc.dg/ssp-4.c: Likewise.

OK, thanks /Marcus

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-09-19  9:06 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04  7:42 [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern Venkataramanan Kumar
2014-09-04  8:19 ` James Greenhalgh
2014-09-04 18:20   ` Venkataramanan Kumar
2014-09-05 15:48     ` Marcus Shawcroft
2014-09-08 15:36       ` Venkataramanan Kumar
2014-09-08 16:27         ` Marcus Shawcroft
2014-09-16 21:36   ` Andrew Pinski
2014-09-16 22:01     ` Venkataramanan Kumar
2014-09-16 22:03     ` James Greenhalgh
2014-09-16 22:25       ` Andrew Pinski
2014-09-17  8:30       ` Richard Earnshaw
2014-09-17 14:43         ` [PATCH AArch64]: Add constraint letter for stack_protect_test pattern) James Greenhalgh
2014-09-17 14:51           ` pinskia
2014-09-18 10:15             ` James Greenhalgh
2014-09-19  9:06               ` Marcus Shawcroft
2014-09-18  8:18           ` Marcus Shawcroft
2014-09-18  9:06             ` Jakub Jelinek
2014-09-17 13:14       ` [PATCH v2 AArch64]: Re: [PATCH AArch64]: Add constraint letter for stack_protect_test pattern Matthias Klose
2014-09-17 22:57         ` Matthias Klose
2014-09-18 22:36         ` Matthias Klose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).