This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Andi Kleen <ak at linux dot intel dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 Sep 2018 18:19:45 +0200
- Subject: Re: PING^6: [PATCH] i386: Insert ENDBR before the profiling counter call
- References: <CAMe9rOqdWncGnrUdbrQXxV_whhPAkJZrAbtXZa9H4nGLMkyZ2Q@mail.gmail.com> <CAFULd4ZSFdUtmpoGpMmurJRrwV8MsFE8Xdk0mfsF-=YnULXHxQ@mail.gmail.com>
> >> 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 this is done
simply by inserting it very first in the instruction stream, but in cases
where profiling code is inserted this breaks because profiling code is
output as string rather than real instructions because it needs the code label
to be referred from mloc_count section.
It is ugly, I wonder how much work would be tu turn profiler insertion to also
use RTL representation?
Honza
>
> Uros.