On Fri, Feb 16, 2018 at 6:21 PM, Dimitry Andric wrote:
> On 17 Feb 2018, at 00:12, Craig Topper via Phabricator <
> revi...@reviews.llvm.org> wrote:
> >
> > craig.topper added inline comments.
> >
> >
> >
> > Comment at: lib/Basic/Targets/X86.cpp:1049
> >
> > + if (HasLAHFSAHF)
dim updated this revision to Diff 134746.
dim added a comment.
Added the `sahf` feature for knm, knl and amdfam10 too.
Repository:
rC Clang
https://reviews.llvm.org/D43394
Files:
include/clang/Driver/Options.td
lib/Basic/Targets/X86.cpp
lib/Basic/Targets/X86.h
test/CodeGen/attr-targe
On 17 Feb 2018, at 00:12, Craig Topper via Phabricator
wrote:
>
> craig.topper added inline comments.
>
>
>
> Comment at: lib/Basic/Targets/X86.cpp:1049
>
> + if (HasLAHFSAHF)
> +Builder.defineMacro("__LAHFSAHF__");
>
> dim wrote:
>> craig.topper wrote:
craig.topper added inline comments.
Comment at: lib/Basic/Targets/X86.cpp:1049
+ if (HasLAHFSAHF)
+Builder.defineMacro("__LAHFSAHF__");
dim wrote:
> craig.topper wrote:
> > Does gcc define this? It's such a low level instruction I have a hard time
> > bel
dim added inline comments.
Comment at: lib/Basic/Targets/X86.cpp:1049
+ if (HasLAHFSAHF)
+Builder.defineMacro("__LAHFSAHF__");
craig.topper wrote:
> Does gcc define this? It's such a low level instruction I have a hard time
> believing this define would b
craig.topper added inline comments.
Comment at: lib/Basic/Targets/X86.cpp:295
setFeatureEnabledImpl(Features, "xsave", true);
setFeatureEnabledImpl(Features, "movbe", true);
break;
KNM and KNL should both have sahf
Comment at: li
dim created this revision.
dim added reviewers: craig.topper, coby, efriedma, rsmith.
Make clang accept `-msahf` (and `-mno-sahf`) flags to activate the
`+sahf` feature for the backend, for bug 36028 (Incorrect use of
pushf/popf enables/disables interrupts on amd64 kernels). This was
originally s