<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_extra"><br><div class="gmail_quote">
<div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div dir="ltr"><div>* It would be better to put the ARM code with the NetBSD ARM code, not separate.</div></div></blockquote><div><br></div></div><div>I don't see how I can combine them, (since struct arm_sync_icache_args looks like</div>





<div>it's BSD specific). I can move the two implementations together in the file, though.</div></div></div></div></div></blockquote><div><br></div><div>Sorry, I meant next to each other, not merged.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote"><div class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">






<div dir="ltr">
<div>* Some platforms apparently fail doing this properly, and syscall returns an error. I don't know if Android guarantees that this works, but it may be worth checking the return value and aborting on syscall failure.</div>





</div></blockquote><div><br></div></div><div>There's several critical codepaths on android that assume success. I don't see a</div><div>CTS test that ensures that android kernels support it, though. I don't mind adding an</div>




<div>abort, since it's pretty dangerous to assume that it will succeeds. What's the right</div><div>"accepted" way to do that ? call compilerrt_abort() ?</div></div></div></div></div></blockquote><div><br>
</div><div>I don't know compiler-rt well, but it looks right. For Android it'll call abort, is that the right thing for you? Maybe the compilerrt_abort implementation needs to also have an Android specialization?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote"><div class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div dir="ltr">


<div>* JITs I've seen all use inline asm with a straight call to svc (with proper ARM/Thumb headache). There seems to be mysticism around this that I've never quite grasped, since the compiler should just emit the svc. See: <a href="http://v8.googlecode.com/svn/branches/bleeding_edge/src/arm/cpu-arm.cc" target="_blank">http://v8.googlecode.com/svn/branches/bleeding_edge/src/arm/cpu-arm.cc</a></div>

</div></blockquote><div><br></div></div><div>I somewhat naively assumed that there would be code does this somewhere</div><div>in the compiler-rt codebase, but there doesn't appear to be any. </div><div><br></div><div>
Is using the chromium code here an option ? Is the v8 / chromium license</div>
<div>compatible with compiler-rt's ? Where does third party code go ?</div></div></div></div></div></blockquote><div><br></div><div>I don't think copy/paste is the right thing, but calling svc is simple enough that a different implementation (one for ARM and one for Thumb) should work, in the same style as other inline asm in this file.</div>
</div></div></div>