Re: [PATCH v4] x86: use builtins to read eflags

From: Nick Desaulniers
Date: Fri Feb 11 2022 - 19:24:21 EST


On Fri, Feb 11, 2022 at 11:25 AM Bill Wendling <morbo@xxxxxxxxxx> wrote:
>
> On Fri, Feb 11, 2022 at 8:40 AM David Laight <David.Laight@xxxxxxxxxx> wrote:
> > From: Bill Wendling
> > > Sent: 10 February 2022 22:32
> > >
> > > v4: - Clang now no longer generates stack frames when using these builtins.
> > > - Corrected misspellings.
> >
> > While clang 'head' has been fixed, it seems a bit premature to say
> > it is 'fixed' enough for all clang builds to use the builtin.
> >
> True, but it's been cherry-picked into the clang 14.0.0 branch, which
> is scheduled for release in March.

While I've requested a cherry pick, the auto PR has not yet been
merged into the release/14.x branch.
https://github.com/llvm/llvm-project/issues/46875#issuecomment-1035262333
https://github.com/llvmbot/llvm-project/pull/42

I share David's concern. We currently support clang-11+, see
Documentation/process/changes.rst

Users external to Google do not necessarily live at ToT LLVM; we MUST
support them. There are also multiple unwinders for x86 selectable at
kconfig time; this patch has implications for those different choices.

I would like to discuss this further off list with you Bill before you
resend this patch again. Please do not resend this patch again until
we've had the chance to speak more about it. I'm generally in favor
of the intent of this patch, but let's make sure this patch is the
best it can be for everyone, regardless of their compiler, compiler
version, or unwinder.
--
Thanks,
~Nick Desaulniers