[llvm-dev] lli cannot execute the bc file for RISCV, Unable to find target for this triple

Junning Wu via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 2 04:51:53 PDT 2020

Cool, thanks!
I also got this answer from https://llvm.org/docs/CommandGuide/lli.html,
which says that “*lli* is *not* an emulator. It will not execute IR of
different architectures and it can only interpret (or JIT-compile) for the
host architecture.”
Thanks a lot. I will try QEMU or gem5.

On Thu, Apr 2, 2020 at 6:55 PM Luís Marques <luismarques at lowrisc.org> wrote:

> On Thu, Apr 2, 2020 at 2:00 AM Junning Wu via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>> 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.
>> Can anyone figure out why this happens?
> 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.
> 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.
> Best,
> Luís
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200402/e1d3976d/attachment.html>

More information about the llvm-dev mailing list