[LLVMdev] Getting MCInst "ins" and "outs"
Christoph Grenz
christophg+llvm at grenz-bonn.de
Wed Dec 26 08:53:05 PST 2012
Hi,
Am Mittwoch, 26. Dezember 2012, 15:20:27 schrieb Manny Ko:
> The MCInstrDesc has a method getNumDefs() which tells you how many 'out
> registers' that MCInst has. The 'out' registers are always at the beginning
> of the list. You can also use getNumOperands().
I've run into the problem, that this doesn't work for instructions which have
variadic arguments like Push and Pop on ARM/Thumb. There is currently no way
to tell if the registers beginning with getNumOperands()-2 are 'ins' or
'outs'.
> Not sure if this is what you are looking for.
>
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
> Behalf Of Vladimir Pouzanov Sent: Sunday, December 23, 2012 3:35 PM
> To: llvmdev at cs.uiuc.edu
> Subject: [LLVMdev] Getting MCInst "ins" and "outs"
>
> [...]
>
> 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?
I don't know about your specific case, but these are often flags (for
conditional execution, addressing specification etc.). They might show as
suffixes on the instruction name in the assembly.
More information about the llvm-dev
mailing list