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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160505/7a9e8851/attachment.html>
Ahmed Bougacha via llvm-dev
2016-May-06 00:51 UTC
[llvm-dev] OPERAND_MEMORY in MCOperandInfo
On Thu, May 5, 2016 at 5:09 PM, Tom Chen via llvm-dev <llvm-dev at lists.llvm.org> wrote:> 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> Thanks, > Tom > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >