BInary encode of LLVM's ISA?

Hi,all

Where may I find the binary encode of llvm's ISA?
I would like to load the instructions from llvm bitcode file and
translate it to another kind of ISA dinamically,but I searched all docs
in llvm.org,nothing has been found ,can anyone help me?

zhunan
2009.7.1

2009/6/30 zhunan <zhunansjtu@gmail.com>

Where may I find the binary encode of llvm’s ISA?
I would like to load the instructions from llvm bitcode file and
translate it to another kind of ISA dinamically,but I searched all docs
in llvm.org,nothing has been found ,can anyone help me?

You can find the code that reads and writes LLVM bitcode in llvm/lib/Bitcode/{Reader,Writer}/ .

However, why not just use LLVM’s own libraries to parse the binary bitcode and then convert to your representation, rather than re-writing the binary parsing from scratch yourself?