[PATCH] x86 NaCl: Emit LAHF/SAHF instead of PUSHF/POPF
Tim Northover
t.p.northover at gmail.com
Fri Dec 12 10:46:02 PST 2014
In my second attempt to make an intelligent comment here...
Doesn't this neglect the overflow flag?
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:3281-3282
@@ +3280,4 @@
+ if (FromEFLAGS) {
+ BuildMI(MBB, MI, DL, get(X86::LAHF));
+ BuildMI(MBB, MI, DL, get(Mov), Reg).addReg(AX);
+ }
----------------
jfb wrote:
> t.p.northover wrote:
> > I don't think this works. This expansion occurs post-RA doesn't it? In which case AX could be live.
> Correct, that's why AX is pushed/popped before and after lahf/sahf.
Oh bother, don't know how I missed that. Sorry.
http://reviews.llvm.org/D6629
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list