<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 22, 2014 at 10:00 AM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">When we do need to copy EFLAGS, we currently emit a pushf/popw or<br></div>
pushw/popf pair, which could clobber a local variable if we actually<br>
made use of the red zone. I don't think we do though (fortunately).<br>
There are apparently "lahf" and "sahf" we could use instead, if it<br>
came to it (at least for our purposes).<br></blockquote><div><br></div><div>That's horrible.  Can we please never, ever, ever emit popf?  It's a really slow instruction because could change lots of processor state (TF, DF, IF, AC).  sahf+seto and lahf+add0x7f are what we used in DynamoRIO, and they are enough to save the six so-called arithmetic flags.</div>
<div><br></div><div>My guess is that "patches are welcome" here.  :)</div></div></div></div>