<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 23 Nov 2017, at 23:34, comic fans <<a href="mailto:comicfans44@gmail.com" class="">comicfans44@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Wed, Nov 22, 2017 at 10:37 AM, Dean Michael Berris<br class=""><<a href="mailto:dean.berris@gmail.com" class="">dean.berris@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">On 22 Nov 2017, at 02:32, comic fans <<a href="mailto:comicfans44@gmail.com" class="">comicfans44@gmail.com</a>> wrote:<br class=""><br class="">with some dirty hack , I've made xray runtime  'built' on windows ,<br class=""><br class=""><br class="">\o/<br class=""></blockquote><br class="">with more test, I've found that trampoline didn't got built for windows :/<br class="">currently cmake didn't generate build rule for asm so its silently<br class="">ignored(with msvc ide, but not ninja).<br class="">we must have enable_language(ASM_MASM) to use masm, and trampoline<br class="">also need ports.<br class=""><br class=""></div></div></blockquote><div><br class=""></div><div>Right -- this is similar to issues we've run into trying to make XRay work / get built for Darwin too.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class=""><br class="">If you're alright with it, maybe you can send some patches to review,<br class="">preferably through the LLVM Phabricator instance? You can have me or Reid<br class="">(who knows more about COFF and the Windows stuff) as reviewers.<br class=""><br class="">in AsmPrinter, copy/paster xray for coff target<br class=""><br class="">InstMap = OutContext.getCOFFSection("xray_instr_map", 0,<br class="">SectionKind::getReadOnlyWithRel());<br class="">FnSledIndex = OutContext.getCOFFSection("xray_fn_idx",<br class="">0,SectionKind::getReadOnlyWithRel());<br class=""><br class="">in XRayArgs , allow windows platform to use xray args. with this,<br class="">generated code seems have sled and xray parts.<br class=""><br class=""><br class="">Nice, I suspect we can make this change with tests as well, which we can<br class="">build on incrementally.<br class=""></blockquote><br class="">where can I find some examples to test this xray part in llvm ?<br class=""><br class=""></div></div></blockquote><div><br class=""></div><div>Those are in the llvm/test/CodeGen/X86/... -- in particular, searching for 'xray_' in the files there will be the best way of finding examples of what we're looking for to verify.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class=""><blockquote type="cite" class="">in xray runtime,<br class="">bool atomic_compare_exchange_strong(volatile atomic_sint32_t *a,<br class="">                                          s32 *cmp,<br class="">                                          s32 xchg,<br class="">                                          memory_order mo)<br class="">is missed for MSVC , I take atomic_uint32_t implementation<br class=""><br class=""><br class="">This is in compiler-rt/lib/sanitizer_common/... right?<br class=""></blockquote><br class="">yes, sanitizer_atomic_msvc.h didn't provide this override. according<br class="">to msdn of interlockedcompareexchange,  implementation for<br class="">atomic_uint32_t should also works for atomic_sint32_t. this is a<br class="">copy/paste but I think its short enough. any better suggestion ?<br class=""><br class=""></div></div></blockquote><div><br class=""></div><div>I'm sure adding an implementation for atomic_sint32_t will be nice to have across platforms. :)</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class=""><br class="">FunctionRecord pack , __attribute__((packed)) =>  #pragma<br class="">pack(push,1),  msvc also requires bitfields to be same type to pack<br class="">them together( all types => uint32_t)<br class=""><br class=""><br class="">Are you able to test this on other platforms?<br class=""></blockquote><br class="">I've tested this on linux64 (with clang) and it pass check-xray , but<br class="">I don't have mac to test. if changing all attribute to pragma is<br class="">desirable , I can submit a patch for that .<br class=""></div></div></blockquote></div><div class=""><br class=""></div><div class="">We're still working on getting XRay to build right and work on macOS so that shouldn't be a barrier. :)</div><div class=""><br class=""></div><div class="">A patch would be good there too.</div><div class=""><br class=""></div><div class="">Thanks again!</div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">-- Dean</div></div>

</div>
<br class=""></body></html>