<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 2, 2015 at 7:19 PM, Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why does this need to be an intrinsic (as opposed to generic "unknown function" to llvm)?<br>
<br>
Secondly, have you looked into a volatile store / load to an alloca? That should work with PNaCl and WebAssembly.<br>
<br>
E.g.<br>
<br>
define i32 @blackbox(i32 %arg) {<br>
 entry:<br>
  %p = alloca i32<br>
  store volatile i32 10, i32* %p  ;; or store %arg<br>
  %v = load volatile i32, i32* %p<br>
  ret i32 %v<br>
}</blockquote><div><br></div><div>That volatility would have a negative performance impact.</div></div><br></div><div class="gmail_extra">Richard Diamond</div></div>