[PATCH] D15240: X86: Don't emit SAHF/LAHF for 64-bit targets unless explicitly supported
JF Bastien via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 20:42:27 PST 2016
jfb added a comment.
In http://reviews.llvm.org/D15240#332012, @hoffbrinkle wrote:
> In http://reviews.llvm.org/D15240#332004, @jfb wrote:
>
> >
>
>
>
>
> > Agreed, you'll need to compile with `-mattr=+sahf` to avoid that issue.
>
>
> Well, right, but when not using that attribute, we shouldn't generate incorrect code. llvm shouldn't issue a POPFQ unless it knows that it's not blowing away an updated EFLAGS.
Agreed. We're playing a game of whack-a-bug and a significant number of programs expect to run on machines with `lahf`/`sahf` so those uses won out on programs which get sad when `EFLAGS` are clobbered. That was the pre-D6629 status-quo, but the world is slightly better overall. It'll take another whack (and a big one at that) to fix the `EFLAGS` issue.
Repository:
rL LLVM
http://reviews.llvm.org/D15240
More information about the llvm-commits
mailing list