<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Jan 4, 2018 at 12:31 PM Stephen Checkoway via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On Jan 4, 2018, at 04:23, Chandler Carruth via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Sending a note here as this seems likely to be of relatively broad interest.<br>
<br>
It looks like this is producing code of the following form.<br>
<br>
call next<br>
loop:<br>
pause<br>
jmp loop<br>
next:<br>
mov [rsp], r11<br>
ret<br>
<br>
As I understand it, the busy loop is to cause the speculative execution to be trapped in the loop. Was something like ud2 considered? I presume that would stop the speculative execution without involving any of the execution units the way the busy loop does.<br></blockquote><div><br></div><div>The pause instruction will also avoid tying up execution resources in speculative contexts, so I wouldn't expect it to be significantly different.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--<br>
Stephen Checkoway<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>