running x86 program _on_ llvm

前端 未结 3 1652
悲哀的现实
悲哀的现实 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:41

    I think you are looking for LibCPU.

    It has an x86 frontend (well, actually only 8086 at the moment, and that is not even complete, but they're working on it), and since it is built on top of LLVM, it obviously also has an x86 backend, thus making it possible to run x86-on-x86 but passing it through LLVM's optimization, instrumentation and analysis stages.

提交回复
热议问题