<div dir="ltr">Cool, thanks! <br><div>I also got this answer from <a href="https://llvm.org/docs/CommandGuide/lli.html">https://llvm.org/docs/CommandGuide/lli.html</a>, which says that “<strong class="gmail-program" style="color:rgb(0,0,0);font-family:"Lucida Grande","Lucida Sans Unicode",Geneva,Verdana,sans-serif;font-size:14px">lli</strong><span style="color:rgb(0,0,0);font-family:"Lucida Grande","Lucida Sans Unicode",Geneva,Verdana,sans-serif;font-size:14px"> is </span><em style="color:rgb(0,0,0);font-family:"Lucida Grande","Lucida Sans Unicode",Geneva,Verdana,sans-serif;font-size:14px">not</em><span style="color:rgb(0,0,0);font-family:"Lucida Grande","Lucida Sans Unicode",Geneva,Verdana,sans-serif;font-size:14px"> an emulator. It will not execute IR of different architectures and it can only interpret (or JIT-compile) for the host architecture.</span>”</div><div>Thanks a lot. I will try QEMU or gem5.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 2, 2020 at 6:55 PM Luís Marques <<a href="mailto:luismarques@lowrisc.org">luismarques@lowrisc.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 2, 2020 at 2:00 AM Junning Wu via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Since I add some custom instructions to the RISC-V ISA and have not got a simulator, so I want to check out whether these instructions using lli.<br></div><div>Can anyone figure out why this happens?</div></div></blockquote><div><br></div><div>LLI will either interpret the LLVM bytecode or "JIT" it to native code (basically just dynamically do a regular compilation plus code loading), so I don't think LLI is very well suited for your use case.</div><div><br></div><div>In any case, I am currently working on the ELF loader used for the JIT, which AFAIK is basically the only thing remaining for LLI to work for RISC-V, *if* you can then execute the native instructions. So you'll need an emulator anyway. I'm using QEMU, which you can also use for free.</div><div><br></div><div>Best,</div><div>Luís<br></div></div></div>
</blockquote></div>