OPERAND_MEMORY in MCOperandInfo

Hi,
I am working on a class project that needs to generate random MachineInstrs, and I am confused as to what “OPERAND_MEMORY” means in MCOI::OperandKind; specifically, what are the possible types of an MachineOperand (reg, and imm?) when that operand is labeled “OPERAND_MEMORY”?
Thanks,
Tom

Hi,
I am working on a class project that needs to generate random MachineInstrs,
and I am confused as to what "OPERAND_MEMORY" means in MCOI::OperandKind;

All it means is that a given MCOperand is used by the instruction to
"address memory".

I don't think it's used in LLVM proper, but it's used by some LLVM
clients to do smarter disassembly (you can probably find some ancient
references to edis).

specifically, what are the possible types of an MachineOperand (reg, and
imm?) when that operand is labeled "OPERAND_MEMORY"?

OPERAND_MEMORY doesn't say anything about the operand type. For
instance, on x86, addressing mode are represented by 5 operands (regs
and imms [0]), and all should be marked as OPERAND_MEMORY.

-Ahmed

[0] http://llvm.org/docs/CodeGenerator.html#representing-x86-addressing-modes-in-machineinstrs