running x86 program _on_ llvm

前端 未结 3 1705
悲哀的现实
悲哀的现实 2021-02-09 10:14

Is it possible to use llvm to run x86 programs? I.e. I want to use llvm as an x86 simulator to run x86 programs and then instrument the x86 program.

Thanks!

3条回答
  •  野的像风
    2021-02-09 10:27

    Also, there was a project to use LLVM in qemu. It is also a way of running x86 code via LLVM.

    http://code.google.com/p/llvm-qemu/

    It was GSoC project, but there is a code in svn and author have results:

    regular qemu     llvm-qemu rle,dse,simple regalloc   llvm-qemu full opts
    4m35.349s             5m39.697s                        13m50.697s
    

    llvm-qemu twice-thrice slower than qemu, but it works.

提交回复
热议问题