On 7 December 2011 13:03, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net">eric@anholt.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, 7 Dec 2011 11:09:11 -0800, Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> wrote:<br>
> - assert(!p->single_program_flow);<br>
> + /* In principle, we shouldn't be patching IF and ELSE instructions in<br>
> + * single program flow mode when gen < 6, because in single program flow<br>
> + * mode on those platforms, we convert flow control instructions to<br>
> + * conditional ADDs that operate on IP (see brw_ENDIF).<br>
> + *<br>
> + * However, on Gen6, writing to IP doesn't work in single program flow mode<br>
> + * (see the SandyBridge PRM, Volume 4 part 2, p79: "When SPF is ON, IP may<br>
> + * not be updated by non-flow control instructions."). And on later<br>
> + * platforms, there is no significant benefit to converting control flow<br>
> + * instructions to conditional ADDs. So we do patch IF and ELSE<br>
> + * instructions in single program flow mode on those platforms.<br>
> + */<br>
> + if (intel->gen < 6)<br>
> + assert(!p->single_program_flow);<br>
<br>
</div>I stumbled over reading this comment the first couple of times. I think<br>
s/In principle,// would have made it clear for me -- I read the "However<br>
on Gen6" paragraph as trying to explain an exception to "in principle,<br>
... when gen < 6", when it's really true that we don't patch if/else in<br>
SPF for gen < 6.<br>
><br>
</blockquote></div><br>Whoops, you're right. I'll fix this before pushing.<br>