Dan Luu was born feeling adventurous ;-)

But seriously, if you're writing x86 assembly inside of LLVM IR, why not just 
write x86 inside of C and call the C using ccall? Seems easier to me.

> On Dec 26, 2013, at 12:34 AM, Isaiah Norton <[email protected]> wrote:
> 
> There is no way to do this right now. The most pragmatic thing would be to 
> ignore the rest of my email and do one of the other suggestions :)
> 
> But if you are feeling adventurous you might be able to cobble it together 
> starting from:
> 
> - https://github.com/JuliaLang/julia/pull/5046 (inline IR support for Julia)
> - Another PR adding MCJIT support. AFAIK the legacy JIT doesn't support 
> inlining.
> 
> The final issue would be that rdpmc and related instructions are not 
> supported by LLVM (at least as of Sep., per the todo-list; haven't checked 
> further - there is a chance the list is out of sync with the current 
> codebase). So you would need to write inline assembly, inside of inline IR, 
> inside of a Julia function. Have fun!
> 
> 
>> On Tue, Dec 24, 2013 at 4:19 PM, Dan Luu <[email protected]> wrote:
>> Is there way to write inline assembly or otherwise emit the rdpmc 
>> instruction?
>> 
>> There are some simple TLB/cache performance experiments I want to run.
>> Julia seems as good as C for this, except that I want to be able to
>> look at perf counters and probably the TSC, too, and I can't find
>> documentation on how to do this.
>> 
>> 
>> Thanks,
>> Dan
> 

Reply via email to