[PATCH] x86 NaCl: Emit LAHF/SAHF instead of PUSHF/POPF
JF Bastien
jfb at chromium.org
Fri Dec 12 08:46:31 PST 2014
================
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);
+ }
----------------
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.
http://reviews.llvm.org/D6629
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list