running x86 program _on_ llvm

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

    I don't know libCPU, but there is libx86, which does something very similar; if running on an 32-bit x86 processor (but not in 64-bit mode), it runs a virtual 8086 process, if running elsewhere, it tries to emulate the 8086 in software. Pretty cool. Documentation is relatively scarce though.

    http://www.codon.org.uk/~mjg59/libx86/

提交回复
热议问题