[PATCH] x86 NaCl: Emit LAHF/SAHF instead of PUSHF/POPF
Tim Northover
t.p.northover at gmail.com
Fri Dec 12 15:05:00 PST 2014
OK, I'm afraid I have a few more questions:
- What happens for "EAX = COPY EFLAGS"? (It's not good).
- I'm not sure what's available here, but there are ways to check liveness too, which would allow the push/pop to be skipped entirely if AX is dead.
- We probably want to be more careful with the flags on the instructions (at the least LAHF & SAHF should be marked with EFLAGS I think, probably we should get the kill states right too).
- With all this complexity, it might be time for a helper function.
And while we're at it, I think it'd be good to have a single code sequence too. Unless this dance turns out to be slower than pushf/popf (not impossible, even if those are slow).
http://reviews.llvm.org/D6629
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list