[LLVMdev] Getting MCInst "ins" and "outs"
farcaller at gmail.com
Sun Dec 23 15:34:51 PST 2012
I'm looking for some way to do code analysis with LLVM. Can someone please give me a hint, if it is possible to query an MCInst for what are input operands and what are output operands?
Consider we have an instruction:
str r1, [sp, #8]
Being mapped into MCInst instance it has the following operands:
<MCOperand Reg:61> <-- maps to reg r1
<MCOperand Reg:105> <-- maps to reg sp
<MCOperand Imm:8> <-- maps to immed #8
Now, what are the two last operands (that are not actually present in disassembly)? And is it somehow possible to map the operands to OutOperandList/InOperandList found in the td definition?
More information about the llvm-dev