[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:19:23 PST 2016
jfb added a comment.
In http://reviews.llvm.org/D15240#331998, @hoffbrinkle wrote:
> @jfb, this brings back the issue we solved with http://reviews.llvm.org/D6629. We can't issue PUSHFQ/POPFQ as the POPFQ can corrupt EFLAGS by loading a stale value.
Agreed, you'll need to compile with `-mattr=+sahf` to avoid that issue.
We could also teach LLVM to be smarter about flags, but that's quite a bit more work that we've already poured into this!
Repository:
rL LLVM
http://reviews.llvm.org/D15240
More information about the llvm-commits
mailing list