在哪里可以找到 LLVM 位码的操作码编号?

Where can I find the opcode numbers for the LLVM bitcode?

在哪里可以找到 LLVM IR 语言的 LLVM 字节码表示?

像这样 <result> = add <ty> <op1>, <op2>,但是像 this 这样的二进制形式用于 LLVM 而不是 JVM。更具体地说,我想要操作码编号,以便我可以在二进制级别研究位码。

我认为 LLVM 位代码的规范来源是这个文件:

llvm-src/include/llvm/Bitcode/LLVMBitCodes.h

来自可在此处找到的 llvm 源代码:http://llvm.org/releases/

您可能还想查看 llvm-src/lib/Bitcode/Reader 中的代码,它读取 bitcode。

您可以在 include/llvm/IR/Instruction.def

中找到操作码编号

https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_14/include/llvm/Instruction.def