Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread H.J. Lu
> however >> investigate the cleanup for the profiler code. It is not first time it hit us >> and it would be nice to have less code output to function bodies that is not >> visible to RTL passes. >> > > This is the patch I checked into trunk. I wi

Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread H.J. Lu
On Mon, Sep 24, 2018 at 9:55 AM, Jan Hubicka wrote: >> On Mon, Sep 24, 2018 at 9:50 AM, Jan Hubicka wrote: >> >> On Mon, Sep 24, 2018 at 9:19 AM, Jan Hubicka wrote: >> >> >> >> PING. >> >> >> > >> >> >> > Hi, Jan Uros, >> >> >> > >> >> >> > Can you review this patch? >> >> >> >> >> >> I don't kn

Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread Jan Hubicka
> On Mon, Sep 24, 2018 at 9:50 AM, Jan Hubicka wrote: > >> On Mon, Sep 24, 2018 at 9:19 AM, Jan Hubicka wrote: > >> >> >> PING. > >> >> > > >> >> > Hi, Jan Uros, > >> >> > > >> >> > Can you review this patch? > >> >> > >> >> I don't know CET stuff, so I'm not able to review functionality of CET

Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread H.J. Lu
On Mon, Sep 24, 2018 at 9:50 AM, Jan Hubicka wrote: >> On Mon, Sep 24, 2018 at 9:19 AM, Jan Hubicka wrote: >> >> >> PING. >> >> > >> >> > Hi, Jan Uros, >> >> > >> >> > Can you review this patch? >> >> >> >> I don't know CET stuff, so I'm not able to review functionality of CET >> >> patches. >>

Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread Jan Hubicka
> On Mon, Sep 24, 2018 at 9:19 AM, Jan Hubicka wrote: > >> >> PING. > >> > > >> > Hi, Jan Uros, > >> > > >> > Can you review this patch? > >> > >> I don't know CET stuff, so I'm not able to review functionality of CET > >> patches. > > > > My (very partial) understanding is that ENDBR is used to

Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread H.J. Lu
On Mon, Sep 24, 2018 at 9:19 AM, Jan Hubicka wrote: >> >> PING. >> > >> > Hi, Jan Uros, >> > >> > Can you review this patch? >> >> I don't know CET stuff, so I'm not able to review functionality of CET >> patches. > > My (very partial) understanding is that ENDBR is used to mark places where one

Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread Jan Hubicka
> >> PING. > > > > Hi, Jan Uros, > > > > Can you review this patch? > > I don't know CET stuff, so I'm not able to review functionality of CET > patches. My (very partial) understanding is that ENDBR is used to mark places where one can jump/call. So we need to always arrange it first. Normally

Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread Uros Bizjak
On Mon, Sep 24, 2018 at 4:34 PM, H.J. Lu wrote: > On Mon, Apr 2, 2018 at 5:08 AM, H.J. Lu wrote: >> On Mon, Mar 26, 2018 at 4:09 AM, H.J. Lu wrote: >>> On Fri, Jan 26, 2018 at 6:23 AM, H.J. Lu wrote: On Sun, Jan 7, 2018 at 7:11 PM, H.J. Lu wrote: > On Tue, Oct 24, 2017 at 10:58 AM, H.

PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-09-24 Thread H.J. Lu
On Mon, Apr 2, 2018 at 5:08 AM, H.J. Lu wrote: > On Mon, Mar 26, 2018 at 4:09 AM, H.J. Lu wrote: >> On Fri, Jan 26, 2018 at 6:23 AM, H.J. Lu wrote: >>> On Sun, Jan 7, 2018 at 7:11 PM, H.J. Lu wrote: On Tue, Oct 24, 2017 at 10:58 AM, H.J. Lu wrote: > On Tue, Oct 24, 2017 at 10:40 AM, A

PING^5: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-04-02 Thread H.J. Lu
On Mon, Mar 26, 2018 at 4:09 AM, H.J. Lu wrote: > On Fri, Jan 26, 2018 at 6:23 AM, H.J. Lu wrote: >> On Sun, Jan 7, 2018 at 7:11 PM, H.J. Lu wrote: >>> On Tue, Oct 24, 2017 at 10:58 AM, H.J. Lu wrote: On Tue, Oct 24, 2017 at 10:40 AM, Andi Kleen wrote: > "H.J. Lu" writes: >> ---

PING^4: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-03-26 Thread H.J. Lu
On Fri, Jan 26, 2018 at 6:23 AM, H.J. Lu wrote: > On Sun, Jan 7, 2018 at 7:11 PM, H.J. Lu wrote: >> On Tue, Oct 24, 2017 at 10:58 AM, H.J. Lu wrote: >>> On Tue, Oct 24, 2017 at 10:40 AM, Andi Kleen wrote: "H.J. Lu" writes: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr82

PING: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-03-17 Thread H.J. Lu
On Tue, Oct 24, 2017 at 10:58 AM, H.J. Lu wrote: > On Tue, Oct 24, 2017 at 10:40 AM, Andi Kleen wrote: >> "H.J. Lu" writes: >>> --- /dev/null >>> +++ b/gcc/testsuite/gcc.target/i386/pr82699-4.c >>> @@ -0,0 +1,11 @@ >>> +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ >>> +/* { dg

PING^2: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-01-26 Thread H.J. Lu
On Sun, Jan 7, 2018 at 7:11 PM, H.J. Lu wrote: > On Tue, Oct 24, 2017 at 10:58 AM, H.J. Lu wrote: >> On Tue, Oct 24, 2017 at 10:40 AM, Andi Kleen wrote: >>> "H.J. Lu" writes: --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr82699-4.c @@ -0,0 +1,11 @@ +/* { dg-do compile {

PING: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-01-07 Thread H.J. Lu
On Tue, Oct 24, 2017 at 10:58 AM, H.J. Lu wrote: > On Tue, Oct 24, 2017 at 10:40 AM, Andi Kleen wrote: >> "H.J. Lu" writes: >>> --- /dev/null >>> +++ b/gcc/testsuite/gcc.target/i386/pr82699-4.c >>> @@ -0,0 +1,11 @@ >>> +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ >>> +/* { dg

PING [PATCH] i386: Insert ENDBR before the profiling counter call

2017-12-08 Thread H.J. Lu
On Tue, Oct 24, 2017 at 10:58 AM, H.J. Lu wrote: > On Tue, Oct 24, 2017 at 10:40 AM, Andi Kleen wrote: >> "H.J. Lu" writes: >>> --- /dev/null >>> +++ b/gcc/testsuite/gcc.target/i386/pr82699-4.c >>> @@ -0,0 +1,11 @@ >>> +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ >>> +/* { dg

Re: [PATCH] i386: Insert ENDBR before the profiling counter call

2017-10-24 Thread H.J. Lu
ted patch to add a testcase for -mnop-mcount -mrecord-mcount. No other changes otherwise. -- H.J. From 9037eb213339b72b2ad6f927b301f1730ff0cb16 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 24 Oct 2017 08:47:19 -0700 Subject: [PATCH] i386: Insert ENDBR before the profiling counter call

Re: [PATCH] i386: Insert ENDBR before the profiling counter call

2017-10-24 Thread Andi Kleen
"H.J. Lu" writes: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr82699-4.c > @@ -0,0 +1,11 @@ > +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ > +/* { dg-options "-O2 -fpic -fcf-protection -mcet -pg -mfentry > -fasynchronous-unwind-tables" } */ > +/* { dg-final { scan-a

Re: [PATCH] i386: Insert ENDBR before the profiling counter call

2017-10-24 Thread H.J. Lu
On Tue, Oct 24, 2017 at 09:04:05AM -0700, H.J. Lu wrote: > ENDBR must be the first instruction of a function. This patch queues > ENDBR if we need to put the profiling counter call before the prologue > and generate ENDBR before the profiling counter call. > > OK for trunk if there is no regressi

[PATCH] i386: Insert ENDBR before the profiling counter call

2017-10-24 Thread H.J. Lu
ENDBR must be the first instruction of a function. This patch queues ENDBR if we need to put the profiling counter call before the prologue and generate ENDBR before the profiling counter call. OK for trunk if there is no regressions? H.J. --- gcc/ PR target/82699 * config/i386/