[llvm-dev] [X86] API to query MCInstr operand types

S. Bharadwaj Yadavalli via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 28 16:19:09 PST 2018


Can someone please tell me if is there an API (or some other way) to query
MCInstrDesc to find out the type of its memory operands?

As an example, consider the following description of MOV32mr (from

def MOV32mr : I<0x89, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src),
                "mov{l}\t{$src, $dst|$dst, $src}",
                [(store GR32:$src, addr:$dst)], IIC_MOV_MEM>, OpSize32;

or that of MOVSX64rm (from X86InstrExtension.td)

def MOVSX64rm32: RI<0x63, MRMSrcMem, (outs GR64:$dst), (ins i32mem:$src),
                    "movs{lq|xd}\t{$src, $dst|$dst, $src}",
                    [(set GR64:$dst, (sextloadi64i32 addr:$src))],
                    Sched<[WriteALULd]>, Requires<[In64BitMode]>;

Given an MCInstrDesc object, I'd like to know of a way to find out the type
of 'ins' operand  i32mem.

I am particularly interested in figuring out the type of a memory operand
of a given MCInstrDesc, if one exists.

Thanks for any help,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180228/aec8b14b/attachment.html>

More information about the llvm-dev mailing list